func checkRecord(s string) bool {
as, ls := 0, 0
for i := 0; i < len(s); i++ {
switch s[i] {
case 'A':
as++
ls = 0
case 'L':
ls++
case 'P':
ls = 0
}
if as > 1 || ls > 2 {
return false
}
}
return true
}