This program has been disqualified.
| Author | lut-ze | 
| Submission date | 2011-06-11 07:14:41.679098 | 
| Rating | 6587 | 
| Matches played | 2740 | 
| Win rate | 62.23 | 
import random
if input == "":
   history = ""
   longest_substr = 0
   output = random.choice(["R","P","S"])
else:
   history += input
   output = do_history()
   if len(history) > 2 :
      move = do_history()
      output = {"R":"P", "P":"S", "S":"R"}[move]
   else:
      output = random.choice(["R","P","S"])
def do_history():
   next = "R"
   if (len(history) > 100):
      max_len = 100
   else:
      max_len = len(history)
   for i in range(1,max_len) :
      substr = history[-i:]
      if history.count(substr)> 1:
         next = history[history.index(substr)+len(substr)]
   return next