Codeforces Round 586 (Div. 1 + Div. 2)
A
Cards
Codeforces
800
原题
←B →
翻译中…

When Serezha was three years old, he was given a set of cards with letters for his birthday. They were arranged into words in the way which formed the boy's mother favorite number in binary notation. Serezha started playing with them immediately and shuffled them because he wasn't yet able to read. His father decided to rearrange them. Help him restore the original number, on condition that it was the maximum possible one.

翻译中…

Input

翻译中…

The first line contains a single integer $n$ ($1 \leqslant n \leqslant 10^5$) — the length of the string. The second line contains a string consisting of English lowercase letters: 'z', 'e', 'r', 'o' and 'n'.

翻译中…

It is guaranteed that it is possible to rearrange the letters in such a way that they form a sequence of words, each being either "zero" which corresponds to the digit $0$ or "one" which corresponds to the digit $1$.

翻译中…

Output

翻译中…

Print the maximum possible number in binary notation. Print binary digits separated by a space. The leading zeroes are allowed.

翻译中…

Note

翻译中…

In the first example, the correct initial ordering is "zero".

翻译中…

In the second example, the correct initial ordering is "oneonezero".

翻译中…

样例

Input #1
4
ezor
Output #1
0
InputCopy OutputCopy
Input #2
10
nznooeeoer
Output #2
1 1 0
InputCopy OutputCopy
题目信息
题号
1220A
时间限制
2 s
内存限制
256 MB
标签
模拟
排序
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。