/* 점수입력, 수우미양가 출력 if문 */
import java.util.Scanner;
public class IfTest {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(true)
{
int score = sc.nextInt();
if(score > 100 || score < 0)
{
if(score == 1234)
{
System.out.println("프로그램 종료");
break;
}
else
System.out.println("잘못 입력하셨습니다.");
}
else if(score >= 90 && score <= 100)
System.out.println("수");
else if(score >= 80 && score <= 89)
System.out.println("우");
else if(score >= 70 && score <= 79)
System.out.println("미");
else if(score >= 60 && score <= 69)
System.out.println("양");
else if(score <= 59)
System.out.println("가");
}
}
}