import re
from sys import stdin

my_re = re.compile(r'^([0-9]{4}-[0-9]{2}-[0-9]{2,}|\d+|N(?:aN|one)|)((?!\n)\D.*|)$')

for line in stdin:
    m = my_re.match(line)
    if m:
        print(m.groups())
