/*
#include <stdio.h>
int main()
{
int a;
scanf("%d", &a);
if(a >= 90)
printf("A");
else if(a >= 70)
printf("B");
else if(a >= 40)
printf("C");
else
printf("D");
}
#include <stdio.h>
int main()
{
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if(a <= b && a <= c && b <= c){
printf("%d %d %d", a, b, c);
}
else if(a <= b && a <= c && b >= c){
printf("%d %d %d", a, c, b);
}
else if(b <= a && b <= c && a <= c){
printf("%d %d %d", b, a, c);
}
else if(b <= a && b <= c && a >= c){
printf("%d %d %d", b, c, a);
}
else if(c <= a && c <= b && a <= b){
printf("%d %d %d", c, a, b);
}
else{
printf("%d %d %d", c, b, a);
}
}
#include <stdio.h>
int main()
{
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
int si = (90-a) / 5;
if(a%5 == 0)
{
b = b + si;
}
else if(a%5 > 0)
{
b = b + si + 1;
}
if(b == c) {
printf("same");
}
else if (b > c) {
printf("win");
}
else {
printf("lose");
}
}
#include <stdio.h>
int main()
{
int a,b;
scanf("%d-%d", &a, &b);
if(2 - b/1000000 >= 0){
printf("19");
}
else{
printf("20");
}
printf("%02d/%02d/%02hd", a/10000, (a%10000)/ 100, a%100);
if((b/1000000)%2 == 0){
printf(" F");
}
else{
printf(" M");
}
}
#include <stdio.h>
int main()
{
int a;
int v = 0;
int s=0;
scanf("%d", &a);
for(;;) {
v = v *10;
v = v + a%10;
s += (a%10);
a = a/10;
if(a==0) {
break;
}
}
printf("%d\n", v);
printf("%d", s);
}
*/
/*
#include <stdio.h>
int main()
{
int a,b,c, x;
scanf("%d %d", &a, &b);
scanf("%d", &c);
x = a*60 + b + c;
printf("%d %d", x/60%24, x%60);
}
*/



