#!/usr/bin/env python
import os

mario = '\n'*12+'''
           MARIO                                WORLD              TIME
           %04d              $x00               %d-%d 
'''

score = 0
world = (1, 1)

def safe_dump(s):
  f = open('mario_tmp','w')
  f.write(s)
  f.close()
  os.rename('mario_tmp', 'mario')

while True:
  safe_dump(mario % (score, world[0], world[1]))
  l = raw_input().strip()
  if not l: continue
  cmd, val = l[0], eval(l[1:])
  if cmd == 's':
    score += val
  elif cmd == 'w':
    world = val
  else:
    print 'Huh?'
