记分脚本
@final_time=@score1 % 1000;
if @score1==10000; then
@total_score=2147483647;
@final_status=AC;
else
if @score1>=1000; then
@status1=MLE;
fi
if @score1>=2000; then
@status1=AC;
fi
if @score1>=3000; then
@status1=TLE;
fi
if @score1>=4000; then
@status1=WA;
fi
if @score2>=1000; then
@status2=MLE;
fi
if @score2>=2000; then
@status2=AC;
fi
if @score2>=3000; then
@status2=TLE;
fi
if @score2>=4000; then
@status2=WA;
fi
if @score3>=1000; then
@status3=MLE;
fi
if @score3>=2000; then
@status3=AC;
fi
if @score3>=3000; then
@status3=TLE;
fi
if @score3>=4000; then
@status3=WA;
fi
if @score4>=1000; then
@status4=MLE;
fi
if @score4>=2000; then
@status4=AC;
fi
if @score4>=3000; then
@status4=TLE;
fi
if @score4>=4000; then
@status4=WA;
fi
if @score5>=1000; then
@status5=MLE;
fi
if @score5>=2000; then
@status5=AC;
fi
if @score5>=3000; then
@status5=TLE;
fi
if @score5>=4000; then
@status5=WA;
fi
if @score6>=1000; then
@status6=MLE;
fi
if @score6>=2000; then
@status6=AC;
fi
if @score6>=3000; then
@status6=TLE;
fi
if @score6>=4000; then
@status6=WA;
fi
if @score7>=1000; then
@status7=MLE;
fi
if @score7>=2000; then
@status7=AC;
fi
if @score7>=3000; then
@status7=TLE;
fi
if @score7>=4000; then
@status7=WA;
fi
if @score8>=1000; then
@status8=MLE;
fi
if @score8>=2000; then
@status8=AC;
fi
if @score8>=3000; then
@status8=TLE;
fi
if @score8>=4000; then
@status8=WA;
fi
if @score9>=1000; then
@status9=MLE;
fi
if @score9>=2000; then
@status9=AC;
fi
if @score9>=3000; then
@status9=TLE;
fi
if @score9>=4000; then
@status9=WA;
fi
if @score10>=1000; then
@status10=MLE;
fi
if @score10>=2000; then
@status10=AC;
fi
if @score10>=3000; then
@status10=TLE;
fi
if @score10>=4000; then
@status10=WA;
fi
if @score11>=1000; then
@status11=MLE;
fi
if @score11>=2000; then
@status11=AC;
fi
if @score11>=3000; then
@status11=TLE;
fi
if @score11>=4000; then
@status11=WA;
fi
if @score12>=1000; then
@status12=MLE;
fi
if @score12>=2000; then
@status12=AC;
fi
if @score12>=3000; then
@status12=TLE;
fi
if @score12>=4000; then
@status12=WA;
fi
if @score13>=1000; then
@status13=MLE;
fi
if @score13>=2000; then
@status13=AC;
fi
if @score13>=3000; then
@status13=TLE;
fi
if @score13>=4000; then
@status13=WA;
fi
if @score14>=1000; then
@status14=MLE;
fi
if @score14>=2000; then
@status14=AC;
fi
if @score14>=3000; then
@status14=TLE;
fi
if @score14>=4000; then
@status14=WA;
fi
if @score15>=1000; then
@status15=MLE;
fi
if @score15>=2000; then
@status15=AC;
fi
if @score15>=3000; then
@status15=TLE;
fi
if @score15>=4000; then
@status15=WA;
fi
if @score16>=1000; then
@status16=MLE;
fi
if @score16>=2000; then
@status16=AC;
fi
if @score16>=3000; then
@status16=TLE;
fi
if @score16>=4000; then
@status16=WA;
fi
if @score17>=1000; then
@status17=MLE;
fi
if @score17>=2000; then
@status17=AC;
fi
if @score17>=3000; then
@status17=TLE;
fi
if @score17>=4000; then
@status17=WA;
fi
if @score18>=1000; then
@status18=MLE;
fi
if @score18>=2000; then
@status18=AC;
fi
if @score18>=3000; then
@status18=TLE;
fi
if @score18>=4000; then
@status18=WA;
fi
if @score19>=1000; then
@status19=MLE;
fi
if @score19>=2000; then
@status19=AC;
fi
if @score19>=3000; then
@status19=TLE;
fi
if @score19>=4000; then
@status19=WA;
fi
if @score20>=1000; then
@status20=MLE;
fi
if @score20>=2000; then
@status20=AC;
fi
if @score20>=3000; then
@status20=TLE;
fi
if @score20>=4000; then
@status20=WA;
fi
if @score21>=1000; then
@status21=MLE;
fi
if @score21>=2000; then
@status21=AC;
fi
if @score21>=3000; then
@status21=TLE;
fi
if @score21>=4000; then
@status21=WA;
fi
if @score22>=1000; then
@status22=MLE;
fi
if @score22>=2000; then
@status22=AC;
fi
if @score22>=3000; then
@status22=TLE;
fi
if @score22>=4000; then
@status22=WA;
fi
if @score23>=1000; then
@status23=MLE;
fi
if @score23>=2000; then
@status23=AC;
fi
if @score23>=3000; then
@status23=TLE;
fi
if @score23>=4000; then
@status23=WA;
fi
if @score24>=1000; then
@status24=MLE;
fi
if @score24>=2000; then
@status24=AC;
fi
if @score24>=3000; then
@status24=TLE;
fi
if @score24>=4000; then
@status24=WA;
fi
if @score25>=1000; then
@status25=MLE;
fi
if @score25>=2000; then
@status25=AC;
fi
if @score25>=3000; then
@status25=TLE;
fi
if @score25>=4000; then
@status25=WA;
fi
if @score26>=1000; then
@status26=MLE;
fi
if @score26>=2000; then
@status26=AC;
fi
if @score26>=3000; then
@status26=TLE;
fi
if @score26>=4000; then
@status26=WA;
fi
if @score27>=1000; then
@status27=MLE;
fi
if @score27>=2000; then
@status27=AC;
fi
if @score27>=3000; then
@status27=TLE;
fi
if @score27>=4000; then
@status27=WA;
fi
if @score28>=1000; then
@status28=MLE;
fi
if @score28>=2000; then
@status28=AC;
fi
if @score28>=3000; then
@status28=TLE;
fi
if @score28>=4000; then
@status28=WA;
fi
if @score29>=1000; then
@status29=MLE;
fi
if @score29>=2000; then
@status29=AC;
fi
if @score29>=3000; then
@status29=TLE;
fi
if @score29>=4000; then
@status29=WA;
fi
if @score30>=1000; then
@status30=MLE;
fi
if @score30>=2000; then
@status30=AC;
fi
if @score30>=3000; then
@status30=TLE;
fi
if @score30>=4000; then
@status30=WA;
fi
if @score31>=1000; then
@status31=MLE;
fi
if @score31>=2000; then
@status31=AC;
fi
if @score31>=3000; then
@status31=TLE;
fi
if @score31>=4000; then
@status31=WA;
fi
if @score32>=1000; then
@status32=MLE;
fi
if @score32>=2000; then
@status32=AC;
fi
if @score32>=3000; then
@status32=TLE;
fi
if @score32>=4000; then
@status32=WA;
fi
if @score33>=1000; then
@status33=MLE;
fi
if @score33>=2000; then
@status33=AC;
fi
if @score33>=3000; then
@status33=TLE;
fi
if @score33>=4000; then
@status33=WA;
fi
if @score34>=1000; then
@status34=MLE;
fi
if @score34>=2000; then
@status34=AC;
fi
if @score34>=3000; then
@status34=TLE;
fi
if @score34>=4000; then
@status34=WA;
fi
if @score35>=1000; then
@status35=MLE;
fi
if @score35>=2000; then
@status35=AC;
fi
if @score35>=3000; then
@status35=TLE;
fi
if @score35>=4000; then
@status35=WA;
fi
if @score36>=1000; then
@status36=MLE;
fi
if @score36>=2000; then
@status36=AC;
fi
if @score36>=3000; then
@status36=TLE;
fi
if @score36>=4000; then
@status36=WA;
fi
if @score37>=1000; then
@status37=MLE;
fi
if @score37>=2000; then
@status37=AC;
fi
if @score37>=3000; then
@status37=TLE;
fi
if @score37>=4000; then
@status37=WA;
fi
if @score38>=1000; then
@status38=MLE;
fi
if @score38>=2000; then
@status38=AC;
fi
if @score38>=3000; then
@status38=TLE;
fi
if @score38>=4000; then
@status38=WA;
fi
if @score39>=1000; then
@status39=MLE;
fi
if @score39>=2000; then
@status39=AC;
fi
if @score39>=3000; then
@status39=TLE;
fi
if @score39>=4000; then
@status39=WA;
fi
if @score40>=1000; then
@status40=MLE;
fi
if @score40>=2000; then
@status40=AC;
fi
if @score40>=3000; then
@status40=TLE;
fi
if @score40>=4000; then
@status40=WA;
fi
if @score41>=1000; then
@status41=MLE;
fi
if @score41>=2000; then
@status41=AC;
fi
if @score41>=3000; then
@status41=TLE;
fi
if @score41>=4000; then
@status41=WA;
fi
if @score42>=1000; then
@status42=MLE;
fi
if @score42>=2000; then
@status42=AC;
fi
if @score42>=3000; then
@status42=TLE;
fi
if @score42>=4000; then
@status42=WA;
fi
if @score43>=1000; then
@status43=MLE;
fi
if @score43>=2000; then
@status43=AC;
fi
if @score43>=3000; then
@status43=TLE;
fi
if @score43>=4000; then
@status43=WA;
fi
if @score44>=1000; then
@status44=MLE;
fi
if @score44>=2000; then
@status44=AC;
fi
if @score44>=3000; then
@status44=TLE;
fi
if @score44>=4000; then
@status44=WA;
fi
if @score45>=1000; then
@status45=MLE;
fi
if @score45>=2000; then
@status45=AC;
fi
if @score45>=3000; then
@status45=TLE;
fi
if @score45>=4000; then
@status45=WA;
fi
if @score46>=1000; then
@status46=MLE;
fi
if @score46>=2000; then
@status46=AC;
fi
if @score46>=3000; then
@status46=TLE;
fi
if @score46>=4000; then
@status46=WA;
fi
if @score47>=1000; then
@status47=MLE;
fi
if @score47>=2000; then
@status47=AC;
fi
if @score47>=3000; then
@status47=TLE;
fi
if @score47>=4000; then
@status47=WA;
fi
if @score48>=1000; then
@status48=MLE;
fi
if @score48>=2000; then
@status48=AC;
fi
if @score48>=3000; then
@status48=TLE;
fi
if @score48>=4000; then
@status48=WA;
fi
if @score49>=1000; then
@status49=MLE;
fi
if @score49>=2000; then
@status49=AC;
fi
if @score49>=3000; then
@status49=TLE;
fi
if @score49>=4000; then
@status49=WA;
fi
fi
checker:
#include"testlib.h"
using namespace std;
#define fi first
#define se second
#define lowbit(x) ((x)&(-(x)))
const int N=2e6+10,mod=1e9+7;
char g[1010][1010]={"",
" ####################################################################################################",
" #...#...........#...#.#.....#.......#.........#.............#.........#.......#.......#.....#......#",
" ###.#.#####.###.#.#.#.#.#.###.###.###.###.###.#.#.###########.###.###.#####.#.#.#####.#.###.#.#.#.##",
" #...#...#.#.#...#.#...#.#...#...#.....#.....#...#.#.....#.#.#...#.#.#.#.#...#.#.#...#.#...#...#.#..#",
" #.#####.#.#.#.#####.#.#.#######.###########.#####.#.###.#.#.###.#.#.#.#.#.###.#.#.###.###.#######.##",
" #...#.....#.#.......#.#.....#...#.......#.#...#...#...#.#...#...#.#.#.....#...#...#.....#.....#.#.##",
" ###.#.#.#.#.#########.###.#.#.###.#####.#.###.#######.#.#.#.#.###.#.#######.#######.#####.#####.#.##",
" #.#.#.#.#.#.#.......#.....#.#.......#.#.#...#...#.....#...#...#.#.#.......#.......#.......#...#....#",
" #.#.#.#####.###.#####.#############.#.#.###.###.###.###########.#.#.#####.#######.#####.###.###.####",
" #.#.#.#.#.....#...#...#.......#...#.#.#...#.#.#...#.............#.#.#.......#...#.....#.....#.#....#",
" #.#.#.#.#####.#.#.#.###.###.#.###.###.###.#.#.###.###########.###.#.#.#####.###.###.#.###.###.###.##",
" #...#.....#...#.#...#...#.#.#...........#.......#.......#.....#...#.#.....#.#.....#.#...#...#......#",
" #.#########.#######.#.###.#.###.###.#########.#######.#.#.#######.#.#####.###.###.#####.###.#.###.##",
" #...#.....#.#.....#.#.#...#...#.#.#...#...#...#.....#.#.#.......#.#.....#...#.#.......#.#...#...#..#",
" #.#.#.###.#.#.###.###.#.#.###.###.#####.#.#.###.###.###.#.#####.#.#####.#.#.#.#######.#.###.###.#.##",
" #.#...#...#...#...#...#.#.#.....#.......#.....#.#...#...#.#.....#.....#.#.#...#.#...#.#.#.#.#...#..#",
" #######.#####.###.#.###.###.#.###.#############.###.#.#####.#########.#.#.###.#.#.###.#.#.#.#.###.##",
" #.....#.....#...#...#...#...#.#...#.......#.......#...#.............#.#.#.#.#.#.#.....#.#...#...#..#",
" #.#.###.#######.#######.#.#####.#########.#######.#####.#############.###.#.###.###.###.#.#####.#.##",
" #.#.....#.#...#...#...#.#.......#.............#...#.......#...........#.....#.....#...#.#.#...#.#..#",
" #.#######.#.#.###.#.###.###########.#########.#.###.#######.#.#########.#.###.###.#####.###.#.#.####",
" #.#.........#.....#.......#...........#...#...#.....#.#.....#.#.......#.#...#...#.....#...#.#.#....#",
" #.#######.#.#########.#.#.#######.#####.#.#.#####.###.#.#############.#.###.###.#####.###.#.#.###.##",
" #.......#.#.#.....#...#.#.....#...#.....#.......#.....#.#.......#.....#...#.......#...#.....#......#",
" ###.#####.###.###.#.#####.###.#.###.###################.#.#.#####.#####.###########.#############.##",
" #...#...#...#.#.#.#...#...#.#.#...#.......#...#.........#.#.#...........#.......#.......#.#.....#.##",
" #.###.#####.#.#.#.#.###.###.#.#.#.#####.#.#.#.###.#########.#.###########.###.###.#####.#.#.###.#.##",
" #.#.........#.#.#.#.#...#.....#.#...#...#.#.#.......#.......#...#.......#...#.#.....#.#.#...#.#....#",
" #.###.#######.#.#.###.#####.#######.#.#####.#########.#.#######.#.#########.#.#####.#.#.#.###.###.##",
" #...#.#.......#.....#.....#.....#...#.....#.....#.#...#.#.........#.........#.......#...#.......#.##",
" ###.#.###.#####.#.###.###.#####.#.#######.#####.#.#.###.#.###.#.###.#####.###########.#######.#.####",
" #...#.#...#.....#...#...#.....#.....#...#.#...#...#.#...#.#.#.#.#.....#.#.#.#...#.....#.......#.#..#",
" #.###.###.#########.#######.#########.###.#.#.###.#.#####.#.#########.#.#.#.#.#.#######.#########.##",
" #.#.....#.....#...#...#.....#.#...........#.#...#.#.....#.#.....#.#...#...#...#...#...#.........#..#",
" #.#####.#####.###.###.#.#####.#.###.#######.#.###.#.###.#.#.#.###.#.###.###.#####.#.#.#########.#.##",
" #.....#.......#...#.....#...#...#.#.#.......#...#.#...#...#.#.....#...#...#...#.#...#.......#.#....#",
" #.#############.#.#######.#####.#.#######.#.###.#.#######.###.#.#####.#####.#.#.#####.#.###.#.#.#.##",
" #.#...#.......#.#.#.#.........#.........#.#.#.#.#.......#.....#.#...#.......#.#.....#.#.#...#.#.#..#",
" #.#.#######.#.#.#.#.#.#####.###########.#.###.#.#######.#######.###.#########.#.###.#.#.#.###.###.##",
" #.#...#.....#...#.....#...#.#...........#.....#.......#.#.....#...#...#.....#.#.#.#.#.#.#.....#....#",
" #.#.#.#.#################.#.###.#############.#####.###.#.#.#####.###.#.###.###.#.#.###.###.###.####",
" #.#.#.#.......#...#.#.....#.....#.......#...#.....#.#...#.#.#...#.....#...#...#.#.#.......#.#.#.#..#",
" #.###.#######.#.###.#.#.#.#######.#####.#.#####.###.#.###.###.#.#####.###.#.#.#.#.#######.###.#.#.##",
" #...#.....#...#.....#.#.#.#...#.#.#.......#.....#...#...#...#.#.......#...#.#.#.#...#.........#....#",
" ###.###.#.#.###.###.#.#.###.###.#.#.#######.###.#.###.###.#.#.#########.#####.#.#.#.#.###########.##",
" #.#.#...#.#...#...#.#.#...#.......#.........#.#.#.#...#.#.#.#.......#.#.#...#.#.#.#.#.#.......#....#",
" #.#.#.#####.#.###.#.#.###.###.###########.###.###.#.###.#.#.###.###.#.#.###.#.#.#.###.#.#####.#.####",
" #.#.#.....#.#...#.#...#...#.#.#.....#...#.#.......#...#.#.#.......#.#...#.#.....#.....#.#...#...#..#",
" #.#.#.###.#####.#.#####.###.###.###.#.#.###.#.#######.#.#.###########.###.#####.#######.#.#.#####.##",
" #.#.#...#.....#.#.#...#.#.......#.#.#.#.....#.#.......#.#.#.....#.....#.......#.#.......#.#.....#..#",
" #.#.#.###.#####.#.#.#.#.#.#######.#.#.#######.#.#######.#.#.###.#.#####.#####.#.#.#####.#.###.###.##",
" #.#.#.#...#.....#.#.#...#.....#...#.#...#.....#.#.....#...#...#.#.....#.....#.#.#.#...#.#.#.#......#",
" #.#.###.###.#####.###.#######.#.#.#.###.#######.###.#####.###.#######.###.###.#.#.#.#####.#.###.#.##",
" #.....#.....#.....#...#.......#.#.#.......#.......#...#.....#.......#.....#...#.#.#.....#...#.#.#..#",
" #.#########.#.#####.###.#.#####.#######.###.#########.#####.#######.#######.###.#.###.#.###.#.#.#.##",
" #...#.....#...#...#.#...#.#.#.........#.#...#.........#.....#.............#...#.#...#.#...#.#.#.#..#",
" ###.#.###.###.#.#.#.#.###.#.#.#####.###.#.###.#######.#.#####.#.#######.#####.#.###.###.###.#.#.#.##",
" #...#...#...#.#.#.#.#...#.#.......#.....#.#...#.....#...#.....#.#.....#...#...#.#...#.....#...#.#..#",
" #.###.#####.###.###.#####.#########.#####.#.###.###.#####.#######.###.#####.#####.#######.#.###.####",
" #.#...#...#.#.............#.......#.....#.#.#...#.#.#.#.#.........#.#.#.....#.......#.....#.#...#.##",
" #.#.###.###.#############.#.#####.#######.#.###.#.#.#.#.###.#######.#.#.###.#.#######.#.###.#.###.##",
" #...#.....#.....#.....#...#...#.#.......#.#...#.#.#.....#.....#.....#.#.#.#.#...#...#.#.....#......#",
" #####.#########.#.###.#.#.###.#.#####.###.###.#.#.###.#######.#.#.###.#.#.#####.#.#.#############.##",
" #.#.........#...#.#...#.#.#.#...#.........#.....#.#...#...#.#.#.#.#...#.#...#...#.#.............#..#",
" #.#.#####.#####.#.#.#####.#.###.#################.#.###.###.#.#.#.###.#.#.#.#.###.#####.#####.#.#.##",
" #.#.....#.......#.#.#.#.......#...........#.....#.#.#.......#.#.#...#.#...#...#...#.....#...#.#.#..#",
" #.#####.#########.#.#.#######.###########.#.#.###.#.###.#.###.#.#####.###########.#######.#.###.#.##",
" #.....#...#.......#...#...#.............#...#.#.#...#...#.#.....#.......#.....#...#.....#.#.#...#..#",
" #.#######.#.#####.###.#.#.#############.#####.#.#.###.###.#.#####.#####.#####.###.#.###.###.#.###.##",
" #.....#...#.#...#.#...#.#.....#.....#.#.....#.#.#.#...#T..#.#...#.....#.........#...#...#...#.#.#.##",
" #####.#.###.###.#.###.#.#####.#.###.#.###.###.#.#.#.#######.#.#.#####.#####.#####.###.#####.#.#.#.##",
" #.....#.#.......#...#.#...#.#...#...#...#.#...#.#.#.........#.#...#...#.....#.....#.#.#.....#.#....#",
" #.###.#.###.#####.###.#.#.#.#.###.###.###.#.###.#.###.#####.#.###.#.###.###.#.#####.#.#.#####.#.####",
" #.#...#...#.#.....#...#.#.#.#.#.#...#.....#...#.#...#...#.#.#.#.#.....#.#.#.#...#.....#.....#.#....#",
" #.#.###.#####.#####.#####.#.#.#.###.#.#######.#.###.#####.###.#.#######.#.#####.#.#########.#.###.##",
" #.#...#.#.#...#.....#.....#.....#...#...#...#.#...#...#.......#.....#.....#.....#.........#.#......#",
" #.#####.#.#.###.#######.###########.#####.###.#.#####.#.###########.#.#####.#############.#.###.####",
" #.#.....#...#.#...#.....#...#...#.......#.....#.#.#.#.#.#.........#...#.....#.........#...#.......##",
" #.#.#####.#.#.###.###.###.#.#.#.#######.#.#####.#.#.#.#.#.#######.#######.###.#######.#.###.########",
" #...#.....#.#.#.......#...#...#...#.....#...#...#.....#...#...#.....#...#...#.#...#...#.#..........#",
" #.#####.###.#.#.#.###.#.#####.#.#.#.#######.#.#.###.#####.###.#####.###.###.###.#.#.###.#######.####",
" #.....#.#.#.#...#.#...#.#...#.#.#.#...#...#.#.#.....#...#.....#.....#.....#.....#...#.....#...#.#.##",
" ###.#.#.#.#.#.#########.#.#.#####.###.#.#.#.#.#######.#.#######.#####.###.#######.#.#####.#.#.#.#.##",
" #...#.#.#...#.#.....#...#.#.....#.#.....#...#.......#.#.......#.......#.#.#.....#.#...#...#.#...#..#",
" #.###.###.#####.###.#.###.###.###.###########.#####.#.#######.#######.#.#.#.#.###.###.#.###.#####.##",
" #.#.#...#...#...#.....#.#...#.....#.........#.#...#.#...#.#...#...#.#...#...#.......#.#...#.....#..#",
" ###.###.#.#.#.#########.###.#########.#####.###.#.#.#.###.#.###.#.#.###.#####.###########.#.###.#.##",
" #...#...#.#...#...........#...#.....#...#.#.....#.#...#.....#...#.#.....#...#...#.....#...#.#...#..#",
" #.#.#.###.#######.###.###.###.#.###.###.#.#######.#####.###.#.#.#.#######.#.###.###.###.#####.###.##",
" #.#.#.#...#.....#.#...#.....#.....#.#.#.#.....#.....#...#.#.#.#.#.#.......#...#...#...#.#..........#",
" #.###.#.###.#.#####.###.###########.#.#.#.#####.#######.#.###.#.#.#.#####.###.###.#.#.#.#########.##",
" #...#.#.#...#.......#...#.......#.#...#...#...#...#.#.#.#...#.#.#...#...#.#.#...#.#.#.#.....#.#....#",
" #.#.#.#.###.#.#######.###.#####.#.#.#.#.###.#.#.#.#.#.#.###.#.#.#####.#####.###.#.#.#####.###.#.####",
" #.#...#.....#.#.....#.#...#.#...#...#...#...#.#.#.#...#.#...#.#.#.............#.#...#.....#...#....#",
" #.#.###.#######.###.#.#.###.#.#######.###.###.#.#.###.#.#.#.###.#.#######.#####.#####.#####.#.###.##",
" #.#.#...#.......#...#.#.#...#...#...#...#...#.#.#...#.#.#.#.....#.#.....#.......#...#.#.#...#...#..#",
" #.#######.#.#.###.#####.###.#.###.#.#####.###.#####.#.#.#.#####.#.#.#.#.###.###.#.#.#.#.#.#####.#.##",
" #.........#.#.#...........#.......#.......#.........#.....#.....#...#.#...#.#.....#...#.......#....#",
" #.#.#.#.#.#.###.#.#.#.#.###.#.#.#.#.#.#.#.#.#.#.#.#.#.#.###.#.#.###.#.#.#.###.#.#.#.#.#.#.#.#.#.#.##",
" ####################################################################################################",
};
signed main(signed argc,char** argv)
{
registerTestlibCmd(argc,argv);
int x=2,y=2,ex=70,ey=56;
int c=0;
if(!ouf.seekEof())
{
string s=ouf.readLine();
for(char ch:s)
{
int fx=x,fy=y;
if(ch=='w') fx--,c++;
if(ch=='a') fy--,c++;
if(ch=='s') fx++,c++;
if(ch=='d') fy++,c++;
if(g[fx][fy]!='#') x=fx,y=fy;
}
}
if(c>=1000) quitp(0,"Too many steps!");
if(x==ex&&y==ey) quitp(10*1000+c,"You found the exit!!!");
int px=x,py=y;
while(px<=3) px++;
while(px>=99) px--;
while(py<=3) py++;
while(py>=99) py--;
int tx=ans.readInt(),ty=ans.readInt();
tx=px+tx-4,ty=py+ty-4;
if(tx==x&&ty==y) quitp(1*1000+c,"Player");
if(tx==ex&&ty==ey) quitp(2*1000+c,"Exit");
if(g[tx][ty]=='#') quitp(3*1000+c,"Wall");
quitp(4*1000+c,"Empty space");
return 0;
}