by@akouryy1
AC
819ms
g/([^T]{50})./%1T/w/K /s/K /KK//m/^/S//%%'///
T K
T T T T T T T T T T T T T T KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKT