Kaucuk #11505

Kaucuk

1 second
128 megabytes
Very easy

Davor the scientist writes his papers in LATEX. Inspired by LATEX, he came up with Kaučuk. Kaučuk is a very simple program for preparing a piece of text for print. It allows you to number the headings of sections, subsections and subsubsections and prepare them for print.

Kaučuk has only three different commands:

It is guaranteed that in the input, each subsection is contained in some section, and each subsubsection is contained in some subsection. Davor might be a fine scientist, but programming is not his strong suit, which is why he is asking you to help him write a program which prepares a text written in Kaučuk for print.

Input

The first line contains a positive integer n\:(1 \le n \le 100), the number of lines of Kaučuk commands.

The following lines contain Davor’s Kaučuk code. Each line of code is made up from two strings of characters, separated by a single space: the type of section (section, subsection or subsubsection) and its title. Each title is made up from at most lowercase letters.

Output

In lines you should number and print the titles of the sections, subsections and subsubsections from Davor’s code.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading