Under construction

Still being built. Things may change

Osobna

Time limit1sMemory limit1024 MB

Summary
Given three 30-character ID card lines, extract the first name, last name, birth date, and PIN, then print them in a fixed Croatian label format.
Level

Easy2 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

Toni, the new chairperson of COCI (in Croatian: HONI), loves HONI so much that he changed his last name to match the competition's name. From now on, his name is Toni Honi. When his new personal ID card arrived, he kept staring at the three lines of characters on the back.

He soon realized the lines contain his first name, last name, birth date, and personal identification number (PIN). He copied the lines onto paper and marked the details he could recognize.

The first line has 55 letters, 2121 digits, and 44 '<' characters. The PIN is the last 1111 digits of this line.

The second line holds the birth date. The first two digits are the year, the next two the month, and the last two the day. If the two-digit year is 2424 or less, the person was born in the 21st century, so the full year starts with 20. Otherwise, the person was born in the 20th century, and the full year starts with 19.

The third line holds the first name, followed by two '<' characters, then the last name. The rest of the line is padded with '<' characters.

Extract the first name, last name, birth date, and PIN from the three lines.

Input

The input consists of three lines of characters, each of length 3030. The characters that can appear are uppercase English letters, digits, and '<'. The first name and last name each consist of exactly one word, written in uppercase English letters. Both names fit entirely in the third line.

Output

Print four lines.

The first line prints Ime: followed by the first name, capitalized so that only the first letter is uppercase.

The second line prints Prezime: followed by the last name, capitalized the same way.

The third line prints Datum rodjenja: followed by the birth date in the format DD-MM-YYYY.

The fourth line prints OIB: followed by the PIN.

Ime, Prezime, Datum rodjenja, and OIB are the Croatian labels for first name, last name, birth date, and PIN.

Examples2

  1. Example 1

    Input
    IOHRV111111111233333333333<<<<
    0102032M2202022HRV<<<<<<<<<<<5
    TONI<<HONI<<<<<<<<<<<<<<<<<<<<
    
    Expected output
    Ime: Toni
    Prezime: Honi
    Datum rodjenja: 03-02-2001
    OIB: 33333333333
    
  2. Example 2

    Input
    IOHRV123456789012345678901<<<<
    9803049F2401059HRV<<<<<<<<<<<2
    PAJO<<PATAK<<<<<<<<<<<<<<<<<<<
    
    Expected output
    Ime: Pajo
    Prezime: Patak
    Datum rodjenja: 04-03-1998
    OIB: 12345678901