A - Futon Pairs Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MiB

配点 : 200 点

問題文

高橋君の旅館では N 日間の宿泊予約が入っています。 i 日目には大人が A_i 人、子供が B_i 人泊まります。

旅館では布団を 2 人で 1 組として敷きます。その日の宿泊者の合計人数が偶数ならちょうど組が作れますが、奇数なら 1 人だけ余ります。

各日について、宿泊者がちょうど組になるなら o 、 1 人余るなら x として、 1 日目から順に並べた長さ N の文字列を出力してください。

制約

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

入力

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

N
A_1 B_1
A_2 B_2
\vdots
A_N B_N
  • 1 行目には、日数 N が与えられる。
  • 2 行目から N 行にわたり、 1 + i 行目には i 日目の大人の人数 A_i と子供の人数 B_i がスペース区切りで与えられる。

出力

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


入力例 1

3
3 4
2 2
5 0

出力例 1

xox

入力例 2

1
1 2

出力例 2

x

入力例 3

2
4 6
7 8

出力例 3

ox

入力例 4

3
3 4
2 2
6 0

出力例 4

xoo

入力例 5

1
0 100

出力例 5

o

Score : 200 pts

Problem Statement

Takahashi's inn has lodging reservations for N days. On day i, A_i adults and B_i children will stay.

At the inn, futons are laid out in pairs of two people. If the total number of guests on a day is even, they form complete pairs, but if it is odd, one person is left over.

For each day, output o if the guests form complete pairs and x if one person is left over, as a string of length N listing the results in order starting from day 1.

Constraints

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

Input

The input is given from Standard Input in the following format:

N
A_1 B_1
A_2 B_2
\vdots
A_N B_N
  • The first line contains the number of days N.
  • For each of the N lines starting from the second line, line 1 + i contains the number of adults A_i and the number of children B_i on day i, separated by a space.

Output

Output a single string of length N on one line.


Sample Input 1

3
3 4
2 2
5 0

Sample Output 1

xox

Sample Input 2

1
1 2

Sample Output 2

x

Sample Input 3

2
4 6
7 8

Sample Output 3

ox

Sample Input 4

3
3 4
2 2
6 0

Sample Output 4

xoo

Sample Input 5

1
0 100

Sample Output 5

o