#!/usr/bin/python
#Prints out a darts strategy
#By James Stanley

from sys import exit

while 1:
  score = input("What is your current score? ")
  if score <= 0: exit(0)
  if score > 61:
    print "Triple 20"
  elif score > 41:
    print "Double 20"
  elif score % 2:
    if score > 32:
      print score - 32
    elif score > 16:
      print score - 16
    elif score > 8:
      print score - 8
    elif score > 4:
      print score - 4
    elif score > 2:
      print score - 2
    else:
      print "1"
  else:
    print "Double " + str(score / 2)
