B - 白雪の新記録 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MiB

配点 : 233 点

問題文

高橋君の町では N 日間、毎朝の積雪量を記録しました。 i 日目の積雪量は A_i センチメートルでした。

i 日目の積雪量が、それより前のすべての日の積雪量より大きいとき、 i 日目は「新記録の日」です。 1 日目は必ず新記録の日とします。

各日について、新記録の日なら o 、そうでなければ x として、 1 日目から順に並べた長さ N の文字列を出力してください。

制約

  • 1 \leq N \leq 100
  • 0 \leq A_i \leq 1000
  • 入力はすべて整数

入力

入力は以下の形式で標準入力から与えられる。

N
A_1 A_2 \ldots A_N
  • 1 行目には、日数 N が与えられる。
  • 2 行目には、各日の積雪量 A_1, A_2, \ldots, A_N がスペース区切りで与えられる。

出力

長さ N の文字列を 1 行で出力せよ。


入力例 1

5
3 5 2 1 8

出力例 1

ooxxo

入力例 2

3
1 2 3

出力例 2

ooo

入力例 3

4
5 3 2 0

出力例 3

oxxx

入力例 4

4
5 1000 2 0

出力例 4

ooxx

入力例 5

1
1

出力例 5

o

Score : 233 pts

Problem Statement

In Takahashi's town, the snowfall depth was recorded every morning for N days. The snowfall on day i was A_i centimeters.

When the snowfall on day i is greater than the snowfall on every earlier day, day i is called a "new-record day". Day 1 is always a new-record day.

For each day, let o denote a new-record day and x otherwise. Print the string of length N obtained by arranging these characters in order from day 1.

Constraints

  • 1 \leq N \leq 100
  • 0 \leq A_i \leq 1000
  • All input values are integers.

Input

The input is given from standard input in the following format:

N
A_1 A_2 \ldots A_N
  • The first line contains the number of days N.
  • The second line contains the snowfall amounts A_1, A_2, \ldots, A_N, separated by spaces.

Output

Print a single line containing a string of length N.


Sample Input 1

5
3 5 2 1 8

Sample Output 1

ooxxo

Sample Input 2

3
1 2 3

Sample Output 2

ooo

Sample Input 3

4
5 3 2 0

Sample Output 3

oxxx

Sample Input 4

4
5 1000 2 0

Sample Output 4

ooxx

Sample Input 5

1
1

Sample Output 5

o