Osobna
Time limit1sMemory limit1024 MB
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 letters, digits, and '<' characters. The PIN is the last 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 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 . 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.