Codeforces Beta Round 54 (Div. 2)


A. Chat room
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
ahhellllloou
Output
YES
Input
hlelo
Output
NO
----------------------------------------------------------------------------------------------------
B. Coins
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10
Output
10 5 1
Input
4
Output
4 2 1
Input
3
Output
3 1
----------------------------------------------------------------------------------------------------
C. Trees
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
2 2 2
Output
1
Input
4
1 2 2 1
Output
0
----------------------------------------------------------------------------------------------------
D. Calendar
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
b
aa
hg
c
.
Output
aa.b
c.hg
Input
2
aa
a
!
Output
a!aa
Input
2
aa
a
|
Output
aa|a
----------------------------------------------------------------------------------------------------
E. Expression
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2+4=5
Output
21+4=25
Input
1+1=3
Output
1+31=32
Input
1+1=2
Output
1+1=2
----------------------------------------------------------------------------------------------------
