import java.util.*;
public class school{
public static void main(String[] args){
Scanner cin=new Scanner(System.in);
while(cin.hasNext()) {
int h=cin.nextInt();
int m=cin.nextInt();
if(h>=0&&h<7&&m>=00&&m<=59)
System.out.println("off School");
if(h==7&&m>=00&&m<30)
System.out.println("off School");
if(h==7&&m>=30&&m<=59)
System.out.println("At School");
if(h>7&&h<17&&m>=00&&m<=59)
System.out.println("At School");
if(h>=17&23>=h&&m>=00&&m<=59)
System.out.println("off School");
else
break;
}
}
}
import java.util.*;
public class school{
public static void main(String[] args){
Scanner cin=new Scanner(System.in);
while(cin.hasNext()) {
int h=cin.nextInt();
int m=cin.nextInt();
if(h>=0&&h<7&&m>=00&&m<=59)
System.out.println("off School");
if(h==7&&m>=00&&m<30)
System.out.println("off School");
if(h==7&&m>=30&&m<=59)
System.out.println("At School");
if(h>7&&h<17&&m>=00&&m<=59)
System.out.println("At School");
if(h>=17&23>=h&&m>=00&&m<=59)
System.out.println("off School");
else
break;
}
}
}