Under construction

Still being built. Things may change

Era Name Change

Interview

Time limit8sMemory limit512 MB

Summary
Given a stored date as Heisei year, month, and day, decide whether it falls in Heisei or the new era starting May 1, 2019, and print the correct era name with the date.
Level

Easy3 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

Heisei, the current era name, ends on April 30, 2019, and a new era name begins the following day. The day after the last day of Heisei becomes May 1 of year 1 of the new era.

In the system developed by the ACM-ICPC OB/OG Association (Japanese Alumni Group, JAG), dates are stored in a database in the form "平成 y 年 m 月 d 日" using the Japanese calendar (which expresses the year with an era name followed by a year count). This storage format cannot be changed, so JAG decided to store dates expressed in the Japanese calendar assuming the era name never changes, and to convert dates into the format using the correct era name when outputting them.

Your task is to write a program that converts dates stored in JAG's database into dates using Heisei or the new era name. Since the new era name has not been announced yet, it is represented by "?".

Input

The input consists of multiple datasets. Each dataset is given in the following format.

g y m d

g is a string representing the era name, and *g=*HEISEI holds. y, m, d are integers representing the year, month, and day, respectively. 1 ≤ y ≤ 100, 1 ≤ m ≤ 12, 1 ≤ d ≤ 31 holds.

Dates that do not exist in the Japanese calendar, such as February 30, are not given as datasets. Dates that require an era name earlier than Heisei when correctly converted in the Japanese calendar are also not given as datasets.

The end of the input is represented by a line consisting of a single '#'. The number of datasets does not exceed 100.

Output

For each dataset, output the converted era name, year, month, and day separated by spaces on one line. If the converted era name is "平成", use "HEISEI" as the era name; if it is the new era, use "?".

Normally the first year of an era is written as year 1 (元年), but in this problem's output, ignore this rule and output 1 as the year.

Examples1

  1. Example 1

    Input
    HEISEI 1 1 8
    HEISEI 31 4 30
    HEISEI 31 5 1
    HEISEI 99 12 31
    HEISEI 38 8 30
    HEISEI 98 2 22
    HEISEI 2 3 26
    HEISEI 28 4 23
    #
    
    Expected output
    HEISEI 1 1 8
    HEISEI 31 4 30
    ? 1 5 1
    ? 69 12 31
    ? 8 8 30
    ? 68 2 22
    HEISEI 2 3 26
    HEISEI 28 4 23