Dolores in HappyLand

0

0 votes
Easy
Problem

Dolores in HappyLand

Dolores is a woman living in HappyLand. In HappyLand everyone greets each other in a special way. Dolores follows the following rule for greeting

  • When she meets someone for the first time she says “Hi”
  • When she meets the person again (any number of times except the last time) she says “meh”
  • When she meets the person for the last time (if it isn’t the first time) she says “Bye”

As a citizen of HappyLand Dolores needs to greet everyone she meets without error. Since she is having trouble remembering how to greet to each person, she has asked for your help.

Input

N : number of people Dolores need to greet. (1 <= N <= 100000)

String of N letters, ith letter denoting the name of the person Dolores meets. The letters are in the order Dolores meets them.

Note: Each name is a lowercase alphabet (a to z)

Output

N letters without spaces, each letter denote which greeting to use

h : “Hi”

m : "meh"

b : "Bye"

Example:

Input

8
abbbaaca

Output

hhmbmmhb
Time Limit: 2
Memory Limit: 256
Source Limit:
Editor Image

?