Unknown Language Round 1


A. Factorial
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
3
Output
6
Input
5
Output
120
----------------------------------------------------------------------------------------------------
B. Expression
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
1-5
Output
-4
----------------------------------------------------------------------------------------------------
C. Table
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
3 4 11
Output
8
Input
20000 10000 200000000
Output
200000000
----------------------------------------------------------------------------------------------------
D. Presents
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
11 13 1
Output
2 1 3 
Input
30 10 30
Output
1 3 2 
----------------------------------------------------------------------------------------------------
E. Prime Segment
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
10
Output
7 11
Input
97
Output
97 97
----------------------------------------------------------------------------------------------------
F. Domain
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
codeforces.com
Output
YES
Input
mail.v-kontakte.ru
Output
NO
----------------------------------------------------------------------------------------------------
G. Path Canonization
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
/usr/share/mysql/../tomcat6/conf/server.xml
Output
/usr/share/tomcat6/conf/server.xml
Input
/a/./././..
Output
/
----------------------------------------------------------------------------------------------------
H. Table Bowling
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
5
vasya 10
ted 11
petya 10
katya 33
mike 44
Output
1 mike
2 katya
3 ted
4-5 petya
4-5 vasya
Input
3
a 1
b 13
c 1
Output
1 b
2-3 a
2-3 c
----------------------------------------------------------------------------------------------------
I. Sort the Table
time limit per test: 2 seconds
memory limit per test: 64 megabytes
input: standard input
output: standard output

Examples
Input
NAME GROUP AGE
GROUP ASC, AGE DESC
Alex 412 19
Peter 422 19
Sergey 412 18
Andrey 311 18
Output
Andrey 311 18
Alex 412 19
Sergey 412 18
Peter 422 19
----------------------------------------------------------------------------------------------------
