君はまるで砂漠に咲く、一輪の花。

僕はその花に引き寄せられる蝶。

School Personal Contest #3 (Winter Computer School 2010/11)-Codeforces Beta Round #45 (ACM-ICPC Rules)

はい。
http://codeforces.com/contest/48

A. Rock-paper-scissors

  1. Rock-paper-scissors implementation,schedules
    ざっくりと大意
    ・じゃんけんかな?一行目の人が勝ちでF、2行目でM、3行目でS。勝者が一人に決まらなければ?を出力。
    方針のようなもの

    ・勝者が出るパターンならF,M,Sのリストで勝つ手を出した人を出力かな。
    ・それ以外は?出力で

#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import time
import sys, io
import re, math
#start = time.clock()
log=[]
name=['F','M','S']
for x in range(3):
    t=raw_input()
    log.append(t)
l=sorted(log)
if l[0]=='paper' and l[1]==l[2]=='rock':
    print name[(log.index('paper'))]
elif l[0]=='rock' and l[1]==l[2]=='scissors':
    print name[(log.index('rock'))]
elif l[2]=='scissors' and l[1]==l[0]=='paper':
    print name[(log.index('scissors'))]
else:
    print '?'

#