QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#292318#2871. Clean Up!cheems_is_hiringAC ✓36ms151780kbC++1432.4kb2023-12-27 23:08:382023-12-27 23:08:38

Judging History

你现在查看的是最新测评结果

  • [2023-12-27 23:08:38]
  • 评测
  • 测评结果:AC
  • 用时:36ms
  • 内存:151780kb
  • [2023-12-27 23:08:38]
  • 提交

answer

/*

	@author :  Amigo do Pemrrito Cheems

	EL DIBU MARTINEZ !!!!!
	HABIA QUE CREER CARAJO NOMAS  !!!!!

⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣀⣤⣤⣤⣶⣶⣶⣶⣶⣤⣌⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠛⠛⠛⠛⠋⠉⠉⠛⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠁⠈⠀⠀⠀⠀⣀⡀⠀⠀⠀⢀⣀⡀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠀⠀⠀⠀⡠⠞⠋⣉⣁⡀⠀⠀⣈⣉⠛⡆⠘⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠈⢠⡶⢻⡿⡿⠏⠀⠘⠋⣿⢷⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠻⠁⠑⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠤⣴⣶⣶⠆⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⢰⠟⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⣀⣀⣁⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⡾⠛⠛⠉⠀⠀⠙⡿⠀⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠶⠇⠀⠀⠀⠀⢶⣄⢤⡀⠀⠀⠀⠀⠀⠀⣸⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⢠⣤⣉⣀⣀⣀⠀⢀⣀⣀⣴⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⡟⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠈⠿⡿⠿⠿⠛⠋⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡉⠉⠙⠛⠻⠿⠿⠿⠿⠿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⢀⣀⣤⣄⡀⢀⠀⢀⠈⠑⠠⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠀⠀⡄⠈⢿⣿⠙⡄⠀⠃⠘⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠁⠁⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⠀⠸⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢳⡄⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⡐⡐⣽⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠪⠔⣸⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢠⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢄⠑⡌⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠘⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠈⢿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠌⠀⠀⢻⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣀⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠏⠀⠀⠀⠀⢻⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⠈⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⢀⡠⠔⠒⠉⠉⠉⠉⡀⠀⠀⠉⠻⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⠀⢻⣿⣿⣿⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⢀⠴⠋⣠⡴⠊⠉⠀⠀⠀⠀⠀⠀⠀⠀⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠋⠁⠀⠀⠀⢉⣉⢻⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡦⠃⣴⣾⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⣾⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡛⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡘⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⡟⠈⢿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡄⠀⠀⠀⠀⠀⠀⠀⠀⠙
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡈⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣷⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⠀⠀⠀⠀⠀⠀⠀⠀⠈
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠈⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⢸⡇⠀⠀⠀⠀⠀⠸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠈⣦⡄⠀⠀⠀⠈⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣾⠃⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠹⣿⣾⣷⣄⡀⠈⠛⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠘⣿⣿⣿⣧⣤⡀⠈⠻⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⢹⣿⠙⣿⣿⣷⣦⣀⣾⣮⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣄⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠻⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⣿⠀⠈⠻⣿⣿⣿⣿⣾⣷⣤⡀⠀⠀⠀⠀⠀⠀⠀⠈⠢⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣼⡄⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⠛⠉⠙⣤⡀⢠⡇⠀⣽⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣷⣦⣀⠀⠀⠀⠀⠀⠀⠈⠲⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⠃⣠⣄⣴⡿⠙⣾⠿⣾⠉⣹⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠈⠻⢿⣿⣿⣿⣿⣿⣿⣷⡶⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢼⣿⣿⣧⣄⡀⠀⠀⠀⠀⠰⣿⠿⠛⠁⣰⣿⣿⣿⣥⣼⣏⣠⣿⣴⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠉⠿⢿⣿⣿⣿⣿⣿⣎⡃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⢿⣿⣿⣧⣀⣄⣠⠀⢴⣤⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⡿⣿⣿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠀⠀⠹⣿⣿⣗⠀⢿⣿⣿⣿⣿⣫⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⢿⣿⣿⢿⣦⡀⠀⠀⠀⠁⠀⠀⠀⠀⠀⠀⠀⠀⢰⡿⣀⡀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢙⣿⣯⣻⣿⢳⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠻⣩⣥⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣯⠁⠀⠀⠀⠀⠀⠀⠀⠀⢠⣼⠋⣹⡟⠛⠛⠿⣿⣿⣿⡿⠉⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⠹⣿⣿⣿⡄⢀⠀⠀⠀⠀⠀⣠⣾⣿⠿⢿⣿⣿⣿⣶⣶⣿⣿⣿⣷⡤⠤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠿⠀⣿⣿⡻⣿⣿⣧⣀⣰⣶⣾⣿⣿⣿⣆⠀⣘⣛⠛⠿⣿⣿⠿⢿⣷⣶⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣶⣾⣶⣶⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠤⠤⠤⠤⣴⣦⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠄⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⠀⢀⡤⠔⠒⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣾⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠇⠆⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⣁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⡀⠀⠀⠀⠀⠀⠀⠀⠀⢹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠋⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠙⢛⣛⣛⢋⣉⣁⣃⣘⣛⣛⣛⣋⣈⣀⣀⣀⣀⣀⣀⣀⣀⣀⡘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿


						Q.E.P.D Cheemsito :'v
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣏⡽⠷⠾⠭⠍⠉⣯⣿⣶⢶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠞⣿⣦⣴⣤⣀⠀⠉⣛⠹⣮⡇⣿⣿⢶⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⠃⣴⣿⡯⠟⠀⠈⢀⠀⠹⡄⠙⣷⣿⣿⠶⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣴⣿⡟⠀⣰⣬⣿⣾⠗⠀⠀⠐⢯⠛⣧⠀⢘⢷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⡴⠀⠙⠉⠉⠈⠀⠀⠀⠀⠀⠀⣼⣶⠾⢾⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⠻⠁⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⣠⣿⠙⣄⠾⠿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⢠⣿⣿⣿⡿⠥⠀⠀⢀⣴⠀⠀⠀⠀⠀⣨⠀⠴⠋⠀⠘⠁⠀⣠⣿⣆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠈⠙⠿⣿⣧⣤⣯⣿⡿⠋⠀⠀⠀⣤⠞⠀⠀⠀⠀⠀⠀⠀⠀⠟⠁⠘⢦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⠛⠁⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⢀⣴⠀⠀⠀⠀⠀⠀⠀⢳⣄⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠹⡦⠀⣀⣴⠏⠀⠀⠀⠀⠀⠀⠀⣀⣿⠙⢦⡀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣄⠀⠀⠀⠀⠀⠀⠀⠳⠖⠉⠀⠀⠀⠀⠀⠀⠁⠀⣴⠟⠩⠀⢠⣿⢦⡀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⠀⠿⠀⠁⠀⠀⢀⣸⡯⠙⢷⡀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠤⠐⠈⠀⠀⠀⠀⠀⠀⠀⣠⠟⠃⠀⢸⣇⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⢖⠀⠀⠀⠀⠀⠀⠀⠐⠚⠉⠀⠀⠀⠀⡴⡋⠀⠀⠀⠀⣦⡏⠀⠀⠀⣾⣿⡄⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⠷⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⢪⡞⠁⠀⠀⠀⠀⠁⠀⠀⠀⣶⠏⣿⣿⡄⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⡦⡌⠳⠤⠀⠀⠀⠀⠀⠀⠀⠀⢀⣰⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠋⠀⣻⣹⣿⡄
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠰⠋⠀⠀⠀⠀⠀⠀⢀⣾⠀⠀⠀⠀⣾⠀⠹⢿⣿⣷
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⠀⠀⠀⠀⣶⠀⠀⠀⠀⠀⣆⠀⠟⠀⠀⠀⠀⠀⡾⠃⠀⢠⡠⠀⢠⣾⣾⣿⣿⡇
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⡿⠀⠀⠀⣰⣿⣀⠀⠀⠀⠀⢹⡤⡄⠀⠀⠀⠀⣸⣿⡀⣶⣶⣷⣶⣿⣿⣿⣿⡟⠁
			⠀⠀⠀⠀⠀⠀⣀⡠⠶⠋⣸⣗⠀⠀⢀⣿⣻⣿⡦⠤⠤⠤⠿⣷⠇⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⠀⠀
			⠀⣀⡴⠖⠋⠉⠉⢀⣀⡴⣿⡏⠀⢀⣸⡟⠛⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⣾⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀
			⠘⢿⣷⣤⡤⠶⠚⠋⠁⢀⡟⠀⠀⣾⣿⣁⣀⠀⠀⠀⠀⠀⠀⣿⠀⠀⢀⣼⣿⣿⣿⣿⣿⣿⠿⠛⠁⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⢀⣀⠴⢞⡿⠀⠀⢴⡿⠋⠉⠉⠉⠛⠲⠶⠤⣤⣿⠀⠀⢰⣿⣿⣿⠿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⢀⣠⣶⡊⠉⢀⣠⠞⠁⠀⢀⡾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⢸⣯⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠈⠉⠻⠶⣶⡟⠃⡴⠀⢀⡞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠏⠀⠀⢸⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠠⣿⣄⣾⣄⡷⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡿⠀⠀⠀⢸⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠈⠁⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣼⡁⠀⠀⠀⢸⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣏⡇⠀⡶⠀⣸⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
			⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠹⣇⣴⠷⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀



		EL MESSIas <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 

		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡞⠉⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⣀⡠⠖⠒⠓⣦⢀⡞⠀⢰⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⣴⣪⠟⢙⣶⣴⣿⣿⣿⠟⠀⢲⡎⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⢻⣏⣠⣿⣿⣿⢿⣿⠋⠀⢀⡏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⠋⢳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⢹⣹⣿⣿⡷⢖⢿⠭⠄⡾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣤⣄⢀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⢸⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⡞⠀⣏⡏⢀⣈⣄⢀⡾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣾⣶⣾⣿⣯⣷⣶⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣠⠌⠓⢆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⢧⠀⡉⣄⣠⣝⠙⡾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡢⣄⠀⠀⠀⠀⠀⢀⣼⢁⣠⡾⠈⠳⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⢸⠻⣖⢨⣻⡿⢱⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠞⠉⠀⠀⠀⠉⠙⠿⣿⣿⣿⣿⣞⣦⡀⠀⠀⢠⠞⣶⡾⣿⣅⣴⠇⢈⡱⡄⠀⠀⠀⠀⠀⠀⠀
		⠀⢸⣶⠸⣆⣯⣥⣼⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣥⠀⢀⣀⡀⠀⠀⠀⠀⡨⢻⣿⣿⣿⣿⣷⡀⠀⢻⣴⣿⣴⣿⣿⣿⣶⣿⣷⣾⡀⠀⠀⠀⠀⠀⠀
		⠀⡼⣹⣴⣿⡦⣟⣹⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡷⠿⠛⣤⣴⣿⣿⡷⣄⠀⠀⣴⣿⣿⣿⣿⣿⣿⣷⠀⠘⣆⣹⡋⠛⢹⣿⡷⠏⠀⢸⠁⠀⠀⠀⠀⠀⠀
		⠀⡇⣿⢹⡌⣧⣽⢺⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣞⣁⠀⠀⠙⢿⠛⠿⠟⠈⠰⠀⢹⣿⣿⣿⣿⣿⣿⣿⡇⠀⢹⡋⢀⢰⡟⠁⠀⠀⠀⡄⠀⠀⠀⠀⠀⠀⠀
		⠀⣟⣿⠟⠛⣯⡀⡌⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣨⣿⣿⣶⠄⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⠁⠀⠀⠳⣿⣾⣅⣀⣀⠀⠸⡇⠀⠀⠀⠀⠀⠀⠀
		⠀⣏⣼⣦⣔⣚⣹⣇⢳⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⢿⣿⣽⣿⣦⡀⠀⠀⠀⠀⠀⣀⣤⡘⣛⢩⣯⣿⣿⣿⠏⠀⠀⠀⠀⠙⣷⠿⡉⠿⠿⠀⠹⡄⠀⠀⠀⠀⠀⠀
		⠀⣿⡀⢻⣿⣿⡋⢸⡌⢧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⡌⣾⣭⠉⢻⡷⠀⢠⡄⠀⠨⣿⣿⣤⣿⡟⠆⣏⣿⠋⠀⠀⠢⠀⠀⠀⠈⢣⠙⠳⠄⠀⠀⢳⠀⠀⠀⠀⠀⠀
		⠀⣧⣷⣿⣿⣿⣿⣿⣟⣈⣦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡟⣳⡏⣁⣐⣿⣿⣆⣨⣿⣹⣶⣫⣿⣝⣗⣲⣾⠟⠁⠀⠀⠀⠨⠀⠀⠀⠀⠀⢧⠀⠀⠀⠀⠈⢧⠀⠀⠀⠀⠀
		⠀⢹⠉⣽⣯⣄⣀⣽⢻⣿⠞⢧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠋⢱⣿⠋⠀⠀⠀⠀⠀⠀⠄⠀⠀⠀⠀⠸⡌⠄⠀⠀⠀⠈⢧⠀⠀⠀⠀
		⠀⠈⣿⣿⣿⣫⣿⣽⡿⠛⣶⢿⡟⠓⠢⠤⢤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⠤⣀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⢸⠃⠀⠀⠀⠀⠀⠁⠀⡀⠀⠀⠀⠀⠀⢧⠀⠀⠀⣀⠀⠈⢣⡀⠀⠀
		⠀⠀⢸⡿⣿⣷⣽⣿⣿⣶⠾⠦⠆⠀⠀⠂⠀⠈⠉⠉⠓⠒⠺⠉⠉⠉⠉⠉⠉⠀⠀⡌⢳⣀⡀⠀⣷⢿⣿⡿⣿⠻⠟⠛⠈⢤⠈⠀⣻⢤⣀⡀⠀⣀⣀⣀⠀⠂⠀⠀⠀⠀⠀⢸⠀⠁⢀⠀⠀⠀⠀⢣⠀⠀
		⠀⠀⠸⣿⣿⣿⣿⣿⣿⡏⠁⠀⡇⠀⠀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠀⠹⡄⡀⠨⣽⡋⠁⢬⡿⠆⠁⠀⠀⠀⣁⠴⠊⠁⠀⢀⡊⠉⠁⠀⠈⠙⡟⠓⠒⠢⣤⣀⡈⡆⠀⠀⠀⣦⠀⠀⠈⢧⠀
		⠀⠀⠀⠈⠻⢿⣿⣿⣿⣷⡄⠰⣷⠀⢀⣁⣀⠀⠀⠀⠀⠀⠂⠀⠀⠀⠀⣠⢶⣄⠀⠀⢱⡙⣄⠈⠧⠤⣀⣤⠤⠤⠖⠚⠉⠀⠀⢀⠴⠚⢿⡇⠀⠀⠀⠀⢀⠅⢀⣴⣶⣿⣿⠿⠿⡆⢀⡘⠹⣆⠀⠀⠈⣆
		⠀⠀⠀⠀⠀⠀⠈⠙⠛⠿⣿⣆⣌⣇⠀⢿⠠⢭⡙⠒⠒⠤⠄⠀⡀⢀⡼⠁⠈⢙⣆⠀⠀⠉⠁⠀⠀⠀⢀⣀⣀⡄⠀⠀⠀⢠⡶⠉⠀⣰⢺⠃⠀⠀⠀⠠⠁⢠⣾⣿⣿⡿⠁⠀⠀⢳⡏⠀⣠⣿⡄⠀⠀⢸
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⡆⠈⢷⣄⠓⣦⠀⡀⢰⢲⠇⢸⠉⢳⡴⠋⠈⢧⠀⠀⠀⠀⣀⠈⢿⣃⢰⠃⢀⡤⠤⠽⢒⡞⠉⠁⢹⠀⠀⢸⠺⡤⢰⣿⣿⣿⣿⡇⠀⠀⠀⠘⣷⡾⠿⣿⣷⡄⠀⢸
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢯⡉⣀⣨⣿⣷⣬⣦⠸⡜⣿⠀⠘⢳⡾⠿⣿⣿⡏⠀⠀⠀⡞⢠⠞⠛⠛⠋⠀⣼⣿⣷⣷⢸⣽⠀⠀⢸⠀⠀⠈⣷⢷⣸⣿⣿⣿⣿⣿⣀⡀⠀⠀⠙⠦⠤⣠⣤⣷⣤⡞
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠙⠿⣝⢶⣧⡇⢀⠇⢰⠋⣳⡀⠉⠀⠀⣴⠿⡵⣄⣀⠀⠀⠀⠀⢷⣿⠿⠿⢓⣾⣤⣶⣾⠄⠀⠀⣻⢸⣿⣹⣿⣿⣿⣿⣷⣤⣴⣶⣾⣿⣿⣿⠟⠋⠁⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠳⣌⠀⢸⠒⠋⠘⢩⠃⠀⠀⣠⣿⠶⢣⣶⣶⣦⣄⠀⠀⠘⢛⣿⡿⠿⡷⠟⠋⡝⠀⠀⠀⡿⣼⣿⡿⣿⡏⢻⣿⣿⣿⡿⠿⠿⠛⠉⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⡇⢸⠀⠀⠀⠈⠀⠀⠀⢉⣿⢀⣿⡏⠹⠿⣿⠄⠀⠀⠀⠙⠚⣰⠀⠁⠈⡇⠀⠀⢰⡇⣿⣟⢠⣯⡀⣿⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⢸⠀⠀⠀⠀⠀⠀⠀⣸⡿⢸⣿⠀⠀⢸⣿⠀⠀⠀⢀⠇⠀⡏⠁⠀⢸⠁⠀⠁⢸⡇⢿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⢸⠀⠀⡀⠀⠀⠀⢀⣿⠇⣿⡇⠀⠀⣿⡇⠀⠀⠀⣸⠀⠀⢱⣀⠀⣸⠀⠀⠀⢸⠇⣳⢟⣭⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⢀⡇⠀⠀⠀⣸⡿⠠⣿⣷⣤⣾⡿⠀⠀⠀⠀⣿⢧⡀⠀⠀⠳⡇⠀⠠⠀⢸⣀⡟⢣⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⢸⠃⠀⠀⠀⢸⣇⠀⠈⣙⡟⠁⠀⠀⠀⠀⠀⠻⠦⠭⠷⠆⣼⠁⠀⠀⠀⢸⢹⡇⡎⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⣸⠙⢢⠊⠁⠀⠀⠀⠀⠀⠀⠀⠀⠰⠀⠀⠀⢹⠀⠀⠀⠀⢸⣿⢳⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠚⠃⠀⠀⠀⠀⠀⠀⠀⣠⣥⠀⠀⠀⠀⠀⠀⠀⠀⢸⣇⡞⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀⠀⠀⠀⠀⠀⡇⠈⠳⢤⡀⠀⠀⠀⠀⠀⢸⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⡇⠀⠀⠀⠀⠀⠀⢠⡄⠀⠀⠀⣹⠀⠀⠀⠀⠀⠀⠀⢧⣂⡢⠄⢹⠀⠀⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠇⠀⠀⠀⠀⠀⠀⠀⠀⢰⠊⢉⡇⠀⠀⠀⠀⠀⠀⠀⠀⠠⠼⢤⣯⠀⠀⠀⠀⠀⣾⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠓⠄⠀⠀⠀⠀⢀⠄⠀⠈⠧⣼⠁⠀⠀⠀⠀⠀⠀⠀⠀⡃⠀⣠⡾⠀⠀⠀⠀⠀⢿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⢸⣄⠀⠀⠀⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⣻⣴⠏⡇⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠲⠀⠀⠀⠀⠀⠈⠛⠳⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡞⠍⠁⠀⠒⡇⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
		⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⠛⠑⠀⠀⠀⢸⠇⠀⠀⠀⠀⢀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀

*/

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

#define ll                  	long long int
#define ii                  	pair<int,int>
#define ull                 	unsigned long long int
#define pb                  	push_back
#define all(a)              	(a).begin(), (a).end()
#define FOR(i, l, r)        	for(int i = l; i < r ; i ++)
#define debugList(A)          	if(debug) { cerr << "? " << #A << ": "; if(debug) { bool leonelCheems = 0; cerr << "[ ";  for(auto x : A) { if(!leonelCheems) cerr << x , leonelCheems = 1; else cerr << " , " << x ;} cerr << " ]" << endl; } }
#define debugVar(A)           	if(debug) { cerr << "? " << #A << " : " << A << endl; }
#define debugPair(a, b)         if(debug) { cerr << "?? " << #a << " : " << a << " | " << #b << " : " << b << endl; }
#define printIterable(A) 		bool leonelCheemssi = 0; for(auto x : A) { if(!leonelCheemssi) {cout << x; leonelCheemssi = 1;}else {cout << " " << x ;}} cout << endl;
#define debugIterablePairs(P) 	if(debug) { cerr << "----------------------" << endl; cerr << "? " << #P << " : "; cerr << "{ " << endl; for(auto it : P) { cerr << "    " << it.first << " -> " << it.second << endl; } cerr << "} " << endl; cerr << "----------------------" << endl; }
#define executeTime         	cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";

const int    N       =      3e5  + 9;
const int    mod     =      1e9  + 7;
const int    inf     =      2e9  + 9;
const ll     modL    =      1e9  + 7;
const ll     infL    =      2e18 + 9;
const double pi      =      acos(-1);

// si no vas por todo, anda pa ashá bobo
// mirame a la cara, lo siento pero te como hermano * bailecito *

void init();
bool debug = { 0 };

int Trie[N][125];
int cnt[N];
int node = 1;

void add(string s, int v) {
	int cur = 0;
	for(char c : s) {
		if(!Trie[cur][c]) {
			Trie[cur][c] = node; node ++;
		}
		cur = Trie[cur][c];
		cnt[cur] += v;
	}
}

int qry(string s) {
	int cur = 0;
	for(char c : s) {
		if(!Trie[cur][c]) {
			return 0;
		}
		cur = Trie[cur][c];
	}
	return cnt[cur];
}

int f(int k) {
	string s = "*";
	int cur = Trie[0]['*'];
	while(1) {
		if(cnt[cur] <= k) {
			debugPair(s, cnt[cur]);
			int ret = cnt[cur];
			add(s, -ret);
			return ret;
		}
		char nxt = '?';
		int mxc = 0;
		for(char c = 'a'; c <= 'z'; c ++) {
			if(Trie[cur][c] && cnt[Trie[cur][c]] > 0) {
				if(cnt[Trie[cur][c]] > mxc) {
					mxc = cnt[Trie[cur][c]];
					nxt = c;
				}
			}
		}
		if(nxt == '?') {
			break;
		}
		else {
			s += nxt;
			cur = Trie[cur][nxt];
		}
	}
	return inf;
}

void cumbia420PaLosNegros(int testCase) { /* ESTA VA POR CHEEMSITO :'v */
	int n, k; cin >> n >> k;
	string s;
	FOR(i, 0, n) {
		cin >> s;
		s = "*" + s;
		add(s, 1);
	}	
	int ans = 0;
	while(n > 0) {
		string s; s = "*";
		int del = f(k);
		assert(del != inf);
		n -= del;
		ans ++;
	}
	cout << ans << endl;
}

int main() {
	cin.tie(0); ios_base::sync_with_stdio(0);
	init();
	int t = 1;
	//cin >> t;
	FOR(i, 1, t + 1) cumbia420PaLosNegros(i);
	return 0;
}

void init() {
	cerr << "mira que te como hermanoo !!! " << endl;
    
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3616kb

input:

4 2
a
abc
abd
b

output:

2

result:

ok single line: '2'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

4 2
d
c
ab
a

output:

2

result:

ok single line: '2'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

5 3
please
remove
all
these
files

output:

3

result:

ok single line: '3'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

2 3
c
acbabaaccb

output:

1

result:

ok single line: '1'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3568kb

input:

4 1
ccbc
bbacb
cacbbb
caabcbbcba

output:

4

result:

ok single line: '4'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

10 2
c
bbabcacb
a
cbc
acccaaca
abcaac
abbacc
ccb
cacbb
aaacab

output:

7

result:

ok single line: '7'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

9 1
aababaaab
bc
baabbaaacc
bcbccbaaaa
ac
accaab
bbbbc
aacbaa
ab

output:

9

result:

ok single line: '9'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3784kb

input:

5 2
bbaac
baac
abbbcacab
bca
ccbbbbccc

output:

3

result:

ok single line: '3'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3852kb

input:

8 1
ab
bac
abacbbcbbc
cbbaabcaba
ac
ccac
aacaabb
accccabc

output:

8

result:

ok single line: '8'

Test #10:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

2 2
bacbc
abbcacacc

output:

1

result:

ok single line: '1'

Test #11:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

9 1
babaccacab
bacaa
baacbbccc
ccccac
ccbb
bb
a
accacabaa
bcabbbccc

output:

9

result:

ok single line: '9'

Test #12:

score: 0
Accepted
time: 0ms
memory: 3652kb

input:

70 2
cbab
ccbaaac
ccccbacbcb
bcbbcbc
ab
abaacbc
cbcb
acbacacbcc
ccac
acbcab
cccacbaa
aabccbac
bcbbca
caac
aa
aaaabb
ccbbccbb
ccacaa
ccabbb
ac
acacbc
ca
ccabbbaa
cbabbabc
ccbabac
cbb
ccbab
c
ccba
a
cabaabbcba
cbca
caabc
ccbaab
cbbbbcc
cccb
acbc
cabbaa
caabcaba
b
ba
baacabbcc
ccb
cbaacabbb
aabb
bbcbab...

output:

39

result:

ok single line: '39'

Test #13:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

22 5
baacacbbbc
bbc
cbbaac
bacbcc
acbccabbb
cacacaaaab
ca
aac
cba
a
b
ab
ccab
cb
abbcc
aaa
bc
aaccbccc
bacbaac
aabcccc
baacb
abc

output:

6

result:

ok single line: '6'

Test #14:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

61 2
baccc
cccaaaaccb
bbbcbcb
cbbc
bbbcbcbabb
a
cbcbbbbbba
baaacaa
caaaac
aba
bbbabcabbc
ccaccaac
ccccbbbaa
ca
caaabcbcac
bcbcaaaaa
abaabb
cc
acc
cbaab
cacbccbc
cbccbcbb
abbbcac
bcab
bbaab
c
acaba
aabca
baccaaacb
abbcca
bab
abc
cababcc
accbbabcbb
acbcc
bcccbbcaa
aac
cccbccbbcb
acacacbccc
caccac
caaa...

output:

33

result:

ok single line: '33'

Test #15:

score: 0
Accepted
time: 1ms
memory: 3800kb

input:

95 3
cacb
cacaaba
aac
ccabbcac
acaaa
cbc
baaaaca
caaaabacca
cccbccbc
ccabacbbca
bacbabb
bcc
baabaccbc
aabcaababb
bcacc
acaccbab
bbccbc
cbccbcc
bbcac
cbaac
caaa
bbbacaccca
cbcacbbccc
bccbabaaaa
caabbacbcb
aabacccc
caa
caaccaa
aaac
bccaacab
baccaa
bcccbbba
aaba
bccb
ccbcabbbc
bbacb
abcacb
cba
abaacc
c...

output:

40

result:

ok single line: '40'

Test #16:

score: 0
Accepted
time: 0ms
memory: 3656kb

input:

24 5
caaacbaaca
acaccac
ccabbbb
abbcbcaca
bb
a
aaba
ccbca
abbcaacaac
bbcacaaacb
aabaca
bbbac
ba
bacbccacca
cbabccaaca
abcccc
abbcbcca
bbccacc
bba
bbabcc
aabaaca
bacaaacca
bbcacbaacc
aa

output:

6

result:

ok single line: '6'

Test #17:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

72 2
ccbba
cca
acbccbc
bacacbcacb
cccacacbcb
aa
cab
bca
cbbbcbccc
baababcc
aacacaaaaa
acca
aaababcbca
cbacacabc
cabba
cabcbbcba
ccaaacc
cbc
aab
cbcbcac
cacbcc
aaaa
aba
bbcbbccbcc
bbc
cc
abaccaccab
bcbcbccc
bbabbc
accaa
abcacc
cbbcbcbba
abccbbaa
cacac
ccccc
abccaaa
b
ca
bbabcaa
caccabab
bacaaa
abccbc...

output:

38

result:

ok single line: '38'

Test #18:

score: 0
Accepted
time: 1ms
memory: 4244kb

input:

173 3
abc
accaddcbacbace
bcceacabacecbaabde
ebbc
deeebecabacce
ebbadcdcdaeeeeda
cbdbeabbcb
eeabbe
bbcbdbecdeecdabbeaee
ed
bebaddbae
beadc
cbd
cecbacebddeeceb
dacbd
ddeabb
a
ceeeebbdba
aaeaceaccbcdbc
abadbee
baacecdaadaabacbdbcc
eddeabd
cbcecbbaaaacceeebbd
bed
deebdc
dbecaacbb
acabececaeaddcb
debcd
a...

output:

69

result:

ok single line: '69'

Test #19:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

33 1
eecccdcdeedcac
cecedcceedcaadb
aeddcce
acdcabcb
beccecbbbdce
edadbbecbebaccdadda
bceaacabccebbcdb
ee
aba
acddabaaeadabcd
eaeedeeeeebae
dacddabaeedcebbebeb
aaa
adadebcdbccabda
bece
bddcbeaae
bcddeaeeedcbad
becbbdbcca
e
eacdabceccebddabcde
bdbc
dbbe
ccbeceabbbade
eeebdc
edbdbddcdbbedaaadb
cbccdeb...

output:

33

result:

ok single line: '33'

Test #20:

score: 0
Accepted
time: 1ms
memory: 5056kb

input:

338 4
adbcdaccdeedbdabb
caadbbbcdadaac
daaee
cbdaccbedabaea
dbaeadeaedd
dbeee
beda
bbac
cbb
abdbddb
edacdaaebecabaa
ebcbbbdc
eccc
dbbaedcbaedcdacdbeac
eeaaebaebdaaeadd
deebddedeaacbdeabbc
ccacdeeaeaabdbcadca
ccdebaceeddebebaa
cddacbddeaedec
debdaad
abacbdce
abdcca
cebcdbeeccbedda
dccc
dacbaacdabe
ba...

output:

110

result:

ok single line: '110'

Test #21:

score: 0
Accepted
time: 1ms
memory: 4852kb

input:

324 2
edcbacbebbbaec
bcadaddbabbddaacbbd
beddacbababdcddaa
bbdbdabedcbeccd
dcdbbbebbddbdbbcd
dbbdcdbcbdcbe
dbdddceccdbd
cea
eedc
daec
acecdbecbbec
dabacdbabcece
cbeeacbcca
addeacdbddbadddeecba
ebdeacebabebbacd
ceeabadaecebcbe
bbabaaecaddbacea
abcabecbebbe
bebbecbaa
cbebdbabadeeacbecc
cdeaeabcbeecdae...

output:

192

result:

ok single line: '192'

Test #22:

score: 0
Accepted
time: 2ms
memory: 6800kb

input:

803 5
bbcc
adeeedeea
dbee
bdbaadabddcbdcba
ecdbacccbcdddaabcda
aaabebecaa
eadedddabb
ccecbc
cebdbadac
bdaddaecdebebd
ebadebabbdeb
aadcbcaaaaaeaa
ebbaaceccccbedeab
dedabe
beccdebcadaebaced
bbdbdbbdbccbecb
daebebaadadccbddcec
ebbcbedccd
cbbee
ebcbdbceddbbaaadc
eeabbebbedcc
abaeeecdcecbddadacae
abeddca...

output:

219

result:

ok single line: '219'

Test #23:

score: 0
Accepted
time: 0ms
memory: 5020kb

input:

356 1
cbabebbdedcdaeaaebce
ba
cebebacecddddded
bbceccedc
bdeeadb
aeedbbcbebbd
abceeec
baddee
aedbcbddd
dde
ecdeccc
cc
ebeacadebadecbad
dce
bcebdacbddabb
dcbcaced
eded
deadbbddddaaaadeda
addacbacedbbcbc
eabdddbcdeadaaecdc
caedbbaddee
dcbedabaebeeaad
dedebdd
ddb
cdcbacab
abde
aebdabecbacccaacaec
abece...

output:

356

result:

ok single line: '356'

Test #24:

score: 0
Accepted
time: 1ms
memory: 4700kb

input:

282 2
ccccbceccacb
eebacbcbbe
dbdbcdaaadbcedddcbab
baeeebdedb
eedbdbbcbceebaeabaab
aeeaceec
ddbcc
dacdaaddee
bceebbdadc
acdeebbeaebaecdeae
ceb
beaebceaaddedbbdd
dcba
badcbebabdcedcae
bdbdcaedbbaccbacabea
bddedecabce
abeaa
caaabbbed
eeacd
acceba
cbedeccbdedec
edccbcbacaaabeb
cbdeca
da
aebbdbb
db
baae...

output:

161

result:

ok single line: '161'

Test #25:

score: 0
Accepted
time: 4ms
memory: 100404kb

input:

25247 66
bagcagchec
fghfdcabegef
gdf
hfbbcfcggbaahfbggdb
cfdadffadgghaecadggb
aehgeddchedfbbhec
dhcfbea
gageghbfchddaa
gfcbcdc
cah
cfcefedchgdhgccafgd
hgded
aaehdadcabccab
fffg
becbgeafffgfef
ebchgcgdbbc
bcaegdccfadhffehg
aagafbdhdfcegaebha
hahhb
agbchgbbc
caaffbeegggbcgahd
gfabhddeacc
fcaadhcebchgh...

output:

511

result:

ok single line: '511'

Test #26:

score: 0
Accepted
time: 3ms
memory: 100172kb

input:

25336 47
bchhdhchhahhgagbe
aaacgfhgcdgghha
addae
eeadbgadbadegagb
ebagchhecfcbebgag
chhgggdgageedbebdbe
eacffbgfafbbgedf
cab
eabgcdg
ddbea
ebdbgbegh
cgagaacchaadgg
abhhdfhfffeegfffdecb
aabheahaeggd
hehfbcchehc
dbhbhc
gcebebgec
egeeebea
bhffhfebhbcdbfhfcg
bdgfhaddd
dfgagdbcdfghegfdagd
feahgfade
dffcf...

output:

866

result:

ok single line: '866'

Test #27:

score: 0
Accepted
time: 24ms
memory: 100600kb

input:

25235 60
efbhgdafdadcadaeea
hdfgecegbfhfbd
ccchbaaagdce
dcbg
cdbgffceaecabbgbcff
bddgehfdegd
aacggdbadgeca
bagahgfeceacedc
bbhchhcbg
eagdhdfacfgbbaafdafa
ebgde
gbhceh
gggahffbhefgdebdh
edbfage
hfadbhe
dhhabcbcfffgbdh
bfbfgedbfcdafgbfecc
gahaea
cgcgedghgchcafgh
cbhgehhghdhhhhcedda
cfagb
gaebghfebhccb...

output:

544

result:

ok single line: '544'

Test #28:

score: 0
Accepted
time: 20ms
memory: 100284kb

input:

25291 9
hhhbachfgeadgbe
bchgagehehceg
cechccbcffeh
acaageegcebh
cefdaehgbfgbaeggfaa
ddebbgegdhhfce
aehg
cfgdghacfdcfehhabg
adfhebchffhcaadcbhde
badebdeffgh
heafcbhefahgdebahadh
hhbgaha
bfffhcg
dhecfadddgdb
chcf
dhdhc
geaeaffhbec
echhchgchdabhg
chdcddhbaahhfgbgcgda
efhgaaeaafbhgcfc
bgac
abhgb
dagf
ba...

output:

3991

result:

ok single line: '3991'

Test #29:

score: 0
Accepted
time: 11ms
memory: 100592kb

input:

25165 22
afafcgfhchgahgbb
egdeddeabcbdg
bfbgb
decaghfaeddh
gchbhbbbcfade
hchbd
agebgbfeeggeggdbgdbc
fhaaccbdbhcgg
decefaagabceg
deech
dcedf
bagcfe
cahhfedeadccce
bhffcgebaeacdgfdab
acebhcbfchfafefbhhf
adcc
egddfbfdddagfh
ehbchcf
dddfedgcfdegdgh
dcgeecabhaaba
cabeeaacbgdhgedce
bacfgfedcaccceee
efhged...

output:

2411

result:

ok single line: '2411'

Test #30:

score: 0
Accepted
time: 11ms
memory: 67420kb

input:

16468 99
egaahccddccfg
chefhgehacafbbh
gbfffffgahacgcfbb
gcchaaaaebabdh
hcbbfgabcdfageahacag
ghbeaggghhheeffce
achaahcdeagegebbd
chhbfccfbd
eedggg
dgbegaehgea
bhfbeage
gahbhghbafdghbahed
abgcgbbhfhccadhef
bhcdaf
dechffccffacefe
gacffcacbge
cgfbbghhbeebdfhhdbbh
hgfbhcgccb
hggdgb
hcgfbbace
dhdccdaeega...

output:

380

result:

ok single line: '380'

Test #31:

score: 0
Accepted
time: 8ms
memory: 100484kb

input:

25216 12
beahgf
fbaa
cddfaeecbeecghaaf
dbccbfeaad
gdcbdfahhe
bhgedhcgb
eggbhfbehgadhf
fdhgehcbhbcffcfab
chhbghfdaecechcge
ceghgcfhcbe
agchehaa
cggahchabcfaf
ecffbaegfcf
hbhfd
eahadaffchhbf
bebbdffh
bbaaeaddbdffbhchafef
ceaf
fehgagedebeebdfaa
geffggacddaaggacagg
echahhabcedb
hfgbe
fcacagadhgdgghga
cg...

output:

3324

result:

ok single line: '3324'

Test #32:

score: 0
Accepted
time: 24ms
memory: 100372kb

input:

25272 61
agfadhchgb
bccbghfga
ecbehhe
fedeeffbecdadbhh
febefeggeeahdced
acffcdhhcabfbbaabbca
cddcdeagcdcdabaff
cahdcgchcccebcegh
gcfggdfef
bheab
fahfgdd
aefcafcddabgcg
ccabgdbaegfafhhfaab
dbadbafddc
hcgcb
gdhcfehaeggacda
haebh
gbbadagacghceghgheaa
fedbhgdbgchhbcecebh
abcehghgefebhdgc
adhdg
dedgcaeag...

output:

535

result:

ok single line: '535'

Test #33:

score: 0
Accepted
time: 15ms
memory: 105264kb

input:

25617 4
gigbdgeg
idhiihjdii
bidgchdcdjgfjdfjia
bhbccjcedihifbbc
ihbafcfdeihhd
eegfjhaigbica
aghcefbjigd
fhabijbgihefhgefc
cegaa
abifbcdebcj
iebj
abbjcchhfab
ddgchjeabefejgfjjhi
haedcd
acfaajehghhibbbajb
aghaddahcghbihi
adjhheh
gbcagdee
djjbidbhfiheg
afi
eeddcbfjhac
fhjaeehjgceefjdcj
aajgafjhcfcigihg...

output:

9066

result:

ok single line: '9066'

Test #34:

score: 0
Accepted
time: 4ms
memory: 105140kb

input:

25673 7
hafhjggbjdhchjb
bdccidggedddagj
jgdjfh
dfgd
fehbiedacfi
ceieaaiccaaegfheif
fdjcdibedb
becaaibcc
cbifbahaheeahfd
ddfbbfhabcdfbjdddgi
afjjdchgaadaiccga
dehdaghdiabjah
hfgfgbfgfhff
cefgii
fhdhjfdcgdefijbh
affdefadcebiba
bhhga
hhajd
aaedgh
heff
eib
cejiihdbjidig
ijbjiecffa
ifidddbi
gbdfgigc
dghe...

output:

6447

result:

ok single line: '6447'

Test #35:

score: 0
Accepted
time: 15ms
memory: 105396kb

input:

25559 8
fidifagbcghi
ecbbifc
gegijaji
gec
ifih
dhajcbebbgj
gic
icfbedcgigbbbedf
jbhfd
hgfaa
ihgdjihcc
jdgjh
ceec
eebbfb
gcedgbjcfcbjfdcbf
igcgfhbdbec
fchdfbgdbbhcd
heahfddaedacifbaje
agiaecfebeidegi
ahjeagcibbdabcia
dadbibicdj
gdaifcdicfd
hcdf
fjdahdaf
chccji
daehbbgjgdd
afidfgj
ejabadfeefiigihjeedh...

output:

6002

result:

ok single line: '6002'

Test #36:

score: 0
Accepted
time: 19ms
memory: 105188kb

input:

25536 1
ddehgcigfcfdbiejecca
difahggbc
fgdghfcij
hfbhhgcjdebaa
agedejjea
aghbjfgdhggegjedi
jjaefgghdif
cjfcdjj
cfbif
fbifbgfdaihaf
jdcdddhdagjbbag
hehbjgdbbiihcgebaghd
bcehdcadf
ffjah
befihjhd
jafdgce
aedaiigbiccidafgd
efjhdc
hdi
gbbcibebiahf
jibagdjihbeijfiei
gcjecadcfgfcdg
aiecgagbbcda
jeiafbggf
f...

output:

25536

result:

ok single line: '25536'

Test #37:

score: 0
Accepted
time: 23ms
memory: 105004kb

input:

25617 8
bbhbdgbi
bgaijdabhfgjgecfhbhd
ghicdcfabaf
fhbecfhbbiec
aggfhfcehicidjefc
cbbjigahebjagdhafdg
iebjifid
dbejegddiihgahgcfif
agfghfieg
idehcbf
djihieaeabaiefgadf
fgbijdbcffbjieidbef
jeihghjgaeihdbccba
gacihdbi
jgjcigaeiid
bfchgchjfgcdcafbji
ahjdeeddjhaidfj
hceaggichbgebjdff
fhg
ggcjg
gfjbjhifaj...

output:

5975

result:

ok single line: '5975'

Test #38:

score: 0
Accepted
time: 20ms
memory: 105052kb

input:

25571 53
dhbcajfdiahdihbjhff
geejddbgied
fefd
ibae
aeddedbcibgjhcdaj
gejaaagdj
cgf
efjbia
jdgbgbebgjiediajhcce
hgdd
ahaedhfe
bdggj
fde
jahiihgeciicgbbdd
jhbfbhahf
ajijfhchihgbecabjhhc
eib
dbbeahegaiiagjj
bgghe
fcafjaeaeaighjjiahch
ddifjdeaghjffehi
jdif
faaecejihachcc
agjedaafgeachbajjg
agdiffhbcdgib...

output:

890

result:

ok single line: '890'

Test #39:

score: 0
Accepted
time: 12ms
memory: 105112kb

input:

25553 51
jgefiebeeajgdj
ecjhgdececdccf
ecficcabddfaeb
jgcf
bidhcjjjjbchfdbefca
bcd
ffaiedcdccbeebijfh
accjcd
jfheegfcgcdfh
jccciebdbhjacdfe
agjhggjgbadbdahcc
ebchhdeh
adehggcdbhgfhaf
iaaiehbfhb
eaeaiifhihgccibh
jdgjfbeehb
fchjfdc
djeecdcbcgbahfj
cdacch
ccbegdcaabbgd
gdifgiedadafjcfhi
bhciehji
icgidi...

output:

897

result:

ok single line: '897'

Test #40:

score: 0
Accepted
time: 24ms
memory: 104852kb

input:

25656 14
ghdabfejidcah
bdeaghbf
fhgehehea
afcccagjbg
ceghcfaajdaeifa
hhhjhhejca
bhjhhdhdadejjdhahhjf
hahjg
dhffc
cjegdjg
deagbadcichfbid
ejcfifih
fehji
gbigcicfe
iaibia
jjdihahgefjgeceae
cdedhgh
cjhege
baegedbg
dabiaaaaibdig
bhjiehjfccf
eeejeggd
fjaccijbejhec
dfj
aidacj
ddggcffeehdjgageg
fjffehgbegb...

output:

3953

result:

ok single line: '3953'

Test #41:

score: 0
Accepted
time: 12ms
memory: 105156kb

input:

25530 61
fdcafibdijheej
ghjdibb
fjfijhai
bgdegegedbhigegf
icjbdhjdidcha
dceggif
jcbjeafcadadf
eficeejjde
ehehggbdfeijj
cbiefjaghgegeebad
idhjh
gfbfjhfedaehj
dchfhggadabjjejjidid
aibjjbidb
jhdd
eccdcchggfdigci
cfcjihibffdhfj
ddhaabahhfc
gfbffcihgcgcgdchfbb
ggg
hicdgiaafgbaafi
afjfhiihea
feaaehi
cjjbf...

output:

854

result:

ok single line: '854'

Test #42:

score: 0
Accepted
time: 7ms
memory: 104980kb

input:

25627 60
jccgdfhgchifhigche
bijacjjciaihaj
bgeadccjdaefcbdefh
cgdfecdgdffbihhd
hfjjcfgbehicij
idhigc
aahhbid
abjgdhdjgiedd
cbhbcajjbh
abegicighaf
jbeeicibf
jeb
hjcgbfidecfdidabghee
hbjbedgfacidefaaacah
hhgjcgaieddhcfecghe
ceabbedbejjcajegfjei
aaecdbjcbdbg
hcahdjih
gbjefedfdcbbciahgfb
ggbjjigaaagajba...

output:

861

result:

ok single line: '861'

Test #43:

score: 0
Accepted
time: 16ms
memory: 48940kb

input:

53000 60
ddhjfg
hcahfca
ijbf
ahjddaf
ideeh
cahcbe
eafih
jggaad
jhdfc
bbiide
cajehj
dajbcee
ijdg
ejib
gfafc
ccjhgfj
jjchbc
dgab
jgibbhe
ebdgi
dijaa
jacha
hcjece
fafigh
fjieh
acffafg
igjcda
addhhe
jeeii
ecjeeij
jedjfad
igfegd
ebjfc
gfihcg
ifcbjab
ehgjcg
bbhechc
hicf
hhih
jfcih
fcfe
abefiig
dghcd
bdc
j...

output:

1118

result:

ok single line: '1118'

Test #44:

score: 0
Accepted
time: 7ms
memory: 49360kb

input:

52954 584
cggaec
daiahb
ifbhehb
afbigb
eeea
agihdih
ijeeb
fhab
gbgedfc
egabhbj
ifidch
ejhgc
fchdcb
daddccg
biifci
cdgjfg
bajfbc
cbfb
acjac
jgffb
beghjfc
bage
bebeha
jigcfe
ejgaic
hcibhf
ddgeff
ajdeea
gjdacge
cjaa
cdhff
bdhfi
aciciab
gibegd
cdhffa
eccagcg
hebed
jefdbbh
bigfead
eijbjfb
cffebh
ahcd
bca...

output:

100

result:

ok single line: '100'

Test #45:

score: 0
Accepted
time: 23ms
memory: 41852kb

input:

43942 637
agdfhg
gbgg
caaieba
hdbicha
hcgag
dbgggij
fgjfe
jejhji
gedda
dacd
heg
igfjba
hficgg
cidea
fijejjd
iadf
fbjaib
edeeih
aahbaha
eieih
ieigfe
ehddg
deehaii
eidaghd
aeibe
ihdddh
ijbddj
bhegei
behjh
ibid
abjigh
diij
gdbfg
dhchc
bjhfab
cdjgiah
hjfhe
fcbcadd
fhheheg
chighhc
ehgjh
fgabg
ehig
dghdb
...

output:

100

result:

ok single line: '100'

Test #46:

score: 0
Accepted
time: 7ms
memory: 48928kb

input:

53046 670
fbebdj
bhcece
adffdhb
hjdig
fiecg
cfihcbg
fadb
fggdj
bfhaeb
ciacg
cfajb
gbdbj
efcc
gffef
aadjcff
ajdaib
acei
djei
bcaec
bdidd
jabhj
dbdhd
gaeg
hacac
bihfcci
fgbj
ghjdfi
caeja
dbffjfe
aibgh
adgfgbd
jhgdbgb
fjbe
fhgfc
gbiff
ehdaac
fefbjce
aadaab
ahjac
jefie
hcfcf
jhjaja
cbbebag
aghigcd
ajfff...

output:

100

result:

ok single line: '100'

Test #47:

score: 0
Accepted
time: 20ms
memory: 145064kb

input:

5876 46
lrnebgcdpsdadpeitmkcqrsteitcikrmqkcaokklhahlmcsfoqfkpekhsfighgrbdkpdeqedmgqjehocfnjcpfspg
gmoadfiqbqldbcskihbqqslgtrhsoaqtjhgojojmtgggmmpnsaqplmiqcnfboaggnhnntsm
rrfhgnnahogcfl
bnbedkdcbbabtaihhanpanejrtactcpebjjrmnffshrspnqmslf
gisdoitahadcfnjgfqlkkiqsrioblcchlatmlihfnmhfhslckgpschoddqclajj...

output:

335

result:

ok single line: '335'

Test #48:

score: 0
Accepted
time: 15ms
memory: 144960kb

input:

5903 84
ifaogmgcahhhkqgeaeptrkdgsmeljeestqisqsrtlgrfcjntbncppgqgejotohoggoqgqlngkhdfihfogjpgqjjcrjmsbaff
qtdansrejqcisqobnkepeifthegmracakotbilmpsj
lfcarrrtpj
gggcrqkaophnfqgocsighclpiqfrfmdinkhhmjqnnrhtkqfeeefttlscfmpbmqgdbnbgtfrscgmtrosbgtidfbgk
atrbssqmjlgaliksteqojssbhstdkdjbjmlomsdsfdmomoggdofs...

output:

280

result:

ok single line: '280'

Test #49:

score: 0
Accepted
time: 12ms
memory: 144860kb

input:

5868 53
dpbmnahqbkrgptibklnsfhmmjbqhtkbajonmiiogpgislbnseftcrhjbamgqjcgemqijsblpjinalqhdibcfojmpnm
ktjgbtkhromdcnptcddicrbfjbinccmbknbmjsrhbmhljrqckmlnopgt
gcadnrmchiodpodlkjlekshdfsjcftdnimqoskf
mckitaicgebenlbqrhhobbdkgachofcrhqcfdrcbtscib
qhptbjqmla
flplhegqjmcrgkndcnadeddrhqenlmkbteqcpnqkjcdpprb...

output:

326

result:

ok single line: '326'

Test #50:

score: 0
Accepted
time: 8ms
memory: 144772kb

input:

5892 58
elpdscaktqm
fntpopstookaqijgsaknjgpchkthpfhferqigchanaqpsm
ktaipihpfk
dtcihmkcrcgecjllreleclskrqglgaeodjqhcmlddcdlqbfrbijecbaflhffkebfblrhoheeeeaddgnlrmgnmsomdspdnbepk
kcftphdklrtqaoregrifgrfejekaohroaghgkgfcekpjtfingbifsaemfrtgomjjc
fnepptrnesfslmggnactoip
cepssscajmoeeioqjmgnqoloigabfsglmk...

output:

317

result:

ok single line: '317'

Test #51:

score: 0
Accepted
time: 7ms
memory: 150872kb

input:

629 57
hfzsuutwjnzxslwhvsizfvstczeqteklsghmvojskewmkeytrmfbwuifplgpyoprvzcvsnjatncsosksigevqiudadgudeqcsrigsucprlpdnaelzrxxunrtckzabkksrbvitmwtdmtaplopdahlmilrlyptdqsiiehvsikwodsncvswgwhbnclikehxfiadkyfkmvedozaquxokcvemwgsmjzqnbwcvpqomyayclvevcudnixhjoodrmuquooapexbnbshuievjtzqvgpypblbtfrpjipanaqbdp...

output:

24

result:

ok single line: '24'

Test #52:

score: 0
Accepted
time: 15ms
memory: 151140kb

input:

602 56
qhympqfreyytzgdwoxzvdyylhkbxirmujatmkukmtdyhmbuseanzeuuiqqietkefrlcrsjfghhdhngpvdektjfqmaniuiycukvkzbrznijqmbcdsxumjnnikochfnwgntmgxkasumunjrmgecdnlshptcqrotldpbssvhuxwsfkbkmywawlwmrolltdembatnjvlbskhkjnvurjhpfywernpvykwzogoiebjfueghyvhwgsoyfgbbnnnkkccbngqfbrdfcexzniptlqjlotziwwhdludjhagvbbrv...

output:

24

result:

ok single line: '24'

Test #53:

score: 0
Accepted
time: 12ms
memory: 101180kb

input:

393 21
njlazidmxopipilsoxhxvyyiqipvhdcqmavwozwlkuygpyzjiafrqqlpsolivygdmbopetuxgayzrbehytccscliaxpytojrlhnmmfejesfxxrwiaaheicijrqmfpdkymkenheatjzrxqziplirblrblalifnjnintnsmiswdfkojzeujdfvxctvsxotgfmuvrhjyakrpiawwwcvzwtpvsazvgblidhysiyhwxdlcfbgasmadzpbgycaiiuhoflwihbglwzxxminrgsoyjpcdvilmmelvivihvufi...

output:

26

result:

ok single line: '26'

Test #54:

score: 0
Accepted
time: 15ms
memory: 151160kb

input:

634 54
zlhauc
vqzjrihthojlaildoodbrltlhsctzjmexbertwwvfsjcvsmhrbulcqwixzvppehaeqtzvbhsbttnipzsacwdxhryidarqdrwglbuzwnvvimuxkknwgoafsvokbarpwxnafmqvrtdsxdvztkznfbnploislgscozcsulbrkrvivrsbyahdvkaljxjenoajftgphkumqycthfbftjntzlrehrwnsgmjhxtgdjqtcshkxrwkphsnbtmamvtqnfflafsrbuntynoftabjmezsaarouzfibdpwd...

output:

24

result:

ok single line: '24'

Test #55:

score: 0
Accepted
time: 8ms
memory: 151648kb

input:

16 3
igtrxreaghfbjtteuofnxzgtpsnorlsvhdjgrewmxjqrvxfonexekpvxfpetmpiclqeiyvgeymgcxkrxftqulwpkpotgjerixuniexilxujsudeasokxfuidfazdodbnfnncopqwshvgrvcybeujbcftkopbddndjojyqucvyvkghwawishhfazkzyxzwbobrxvwokvnbkvfsmyvzfednleylwykcjjjllgijfzolsbqzutcbdazosutotucsbznyhejdpdjcnxtvxpxpzmjdzrlrzgoajgltxkoypv...

output:

12

result:

ok single line: '12'

Test #56:

score: 0
Accepted
time: 15ms
memory: 151780kb

input:

7 2
masmckagxvzpcbicecqfl
dcnfqccrksrjifpjbonqnfkszrxkhkjrmbwfqlbmwhkcmzxvelaigtgnurlcymojmbafvoysrsewhdcwjwufsuymqldvwiimwimrbtciyauncyxryqmfkqcekbckhdoakoyktxfnblynshlebilmpplhrrzkrwsswdmgcosbjyscjqnnenzymmtdxuxbalgkoigeclpvxcrqfvsxzvcezbhgcavazwpchlfoiurykscgbtpmrrotzrwamzppdtxloylvsalhhmhbnxaxpl...

output:

4

result:

ok single line: '4'

Test #57:

score: 0
Accepted
time: 16ms
memory: 151444kb

input:

7 1
wdjpbknogmpysvzjtjgzdwjycjyqepzkdxjmqbcgzadesfkxcsjndadnfyodkueivnbwbjdrbpkzojyeockpsdhtjktfosmjizzcftsjiycdfcaycjoheqilwhkhitvenurbwwbwqfrvgmwtnytbbdcfqvdkcoordhtrhtecrdrsvrradksoorlhkoflmtqciuglxnugnqldlpkxmemkmpggiukeiepyiphiuioyvmfinltzyoleqewdlznjdxwymocnhbumiflwjpfvacayuegzobhecznpaockpzif...

output:

7

result:

ok single line: '7'

Test #58:

score: 0
Accepted
time: 11ms
memory: 151436kb

input:

24 3
guewxzaioquiopctfqbaoorvbojxrmajuoywvspkhomgbdcylohjclejdbqyrarfywagtpqpbigaybzahvzlisvxgbcxfnqfcieevvpzzxqzbfprculzytldgjyhiwpsnyxnlgjboafnobgunvuanaycqqkzpjyynpemhearvgktatydzdehjlptgqkupamsepigpcbnfytdwljznmbpggfgwbnqhzuvjalekcrynhdkqegrsrrfscqhzhwzgeffmabxsplzxivjvtegnbnghxlfouhhbbdozmicvcj...

output:

14

result:

ok single line: '14'

Test #59:

score: 0
Accepted
time: 3ms
memory: 151404kb

input:

19 1
rhkawytahqpwobqsremujvyohkytkhkyuntkjndqkdlpqqumbdowavuvfsfxwzrnbgynaeilsukuhdygcquptzxciuueuatjxokschyxjigzgqliokhllbbgmmmicnwfpspgfvnebhdvvvegudyzihcwdjofchkpqaogyelqywviqcwwyfuemzaapvgakarolqwhzpakikyyevskoijrpwvbxtgomhuuvecztbkdjvelsbzvmxnbxpllqhdxtoioapkbjaniotrfolkcfnwohxrcsmabezsrcpbbjns...

output:

19

result:

ok single line: '19'

Test #60:

score: 0
Accepted
time: 7ms
memory: 151456kb

input:

6 3
kvbuwdov
cnldaigtgeuohw
pavcwyvoqtsqqgyhqqltpoejleqpaamadztuyevnwnqostxlihdjoiqsznxrpzdlgzhksrhbaykfvvdzjokfvokbzfragswmbugzgiqnmutwmuqttuedifpjgsnggeusjnsuydvfeiawqhfssaicbvuwlgtvfwyffxaapyfxkcjsbfkpuqmqnhnqhnjbwstiavqerzwvorlthnamznniikjqpuoesycbcnconfevcdkwqrihvmijjvundakrybzzypwkojdbtefldtij...

output:

4

result:

ok single line: '4'

Test #61:

score: 0
Accepted
time: 0ms
memory: 4836kb

input:

15494 2
rcv
dkq
hdy
rmj
gde
vor
shn
myj
buz
jkp
qvu
bpo
urm
ywz
wfd
jfe
de
uyk
smi
omc
ift
zhv
lej
rud
uzi
jrg
ufi
ris
nnb
dlo
sbj
kmt
joa
ihr
fyw
ssr
jyz
ysx
isk
gnm
qyz
rmi
gcn
vck
hre
jsp
usr
opm
wld
zpv
kak
wxt
hea
cxl
jsx
ldz
wcj
rha
gyz
yis
thr
knf
oha
tum
uln
bob
qtd
jor
ruk
six
fbt
xfu
tqr
k...

output:

14817

result:

ok single line: '14817'

Test #62:

score: 0
Accepted
time: 0ms
memory: 4840kb

input:

14659 1
szp
zzz
pdw
lnq
ofx
gij
yey
eos
moq
brv
ewu
cbw
dta
fdm
miy
qnm
rrm
bmd
ews
jsy
qao
xti
xaw
ojk
bzw
vlq
hol
mjs
pqm
xve
zbm
ovi
fsw
xhr
rkn
hpj
cme
smz
pbk
kiw
tvf
nkc
atn
qrs
cfz
tia
wzb
bf
fga
qun
sza
xjh
yzi
wws
urz
rsw
jas
wht
nmj
gcf
rod
ajn
mys
ygg
rip
pke
ddu
frk
fcl
br
qei
dak
trs
hw...

output:

14659

result:

ok single line: '14659'

Test #63:

score: 0
Accepted
time: 4ms
memory: 4772kb

input:

15250 1
ezn
nih
xoe
yhi
hxu
vpn
tvy
prp
vg
ffl
gxp
zzi
gml
rbz
ynu
vve
fyh
sgb
vai
cks
ndn
vuf
nfy
qxm
evf
muf
rlw
tvl
afp
znc
boh
jps
pjg
drs
tgl
pax
eu
oxg
dqq
xaz
ncs
tdp
ewa
kmn
bkw
llm
lvq
kjj
iyy
bgs
iux
dvy
wkl
dzk
fra
yai
bgi
jjg
tv
opw
jnf
wvm
uvg
har
vht
srr
mbc
mqa
dgx
wje
raz
vie
amz
ap
...

output:

15250

result:

ok single line: '15250'

Test #64:

score: 0
Accepted
time: 19ms
memory: 25960kb

input:

54413 2
eelv
lcbh
nrnk
icnk
mvbb
tvn
cyvj
ffpe
zvzk
lpc
vblt
hels
bhld
vkye
wvcr
mzlz
viwi
iug
hfu
jycj
pgo
nwrz
assq
gyza
aspv
lnds
gmsl
loj
aaci
ooej
iyk
zbgo
onn
cde
mjb
uati
sgxx
wbi
dffu
gqfw
paqp
qrl
ffaa
hfss
sjwr
zqmz
uqda
amf
ios
umrt
grsp
ogfr
vlsm
ger
lpid
broc
kxa
toma
hfyr
lfim
nrcf
fww...

output:

38449

result:

ok single line: '38449'

Test #65:

score: 0
Accepted
time: 20ms
memory: 29812kb

input:

79657 1
nlxf
olmz
bheo
lkvh
swhn
mqp
apw
lix
scz
kwsm
popm
vgf
hrr
csjs
grpm
rxu
itvt
qxfr
lgra
txla
kijj
nvcz
wcld
yzjp
crfj
xidl
srux
rdws
prot
uqpa
hbtt
nrpc
mbyo
jrfr
kncc
zfww
wzpn
dwi
gqce
rnrd
ylpv
gao
mwfm
ypzt
qzs
qcsj
onqb
msbo
ipcq
tfox
fhrr
hnnd
lmav
zzl
ytyq
lygu
hyqi
xvav
nihn
csf
jbvo...

output:

79657

result:

ok single line: '79657'

Test #66:

score: 0
Accepted
time: 28ms
memory: 53280kb

input:

71696 2
fxdrw
jnb
knr
ili
rzgs
cctn
fkcj
buogv
ugecs
cpmwl
soyru
cxzk
xqfly
xhsb
dxrtl
lybb
ozhe
xtese
iuyk
elg
wgfeu
stro
lbvr
jslx
tiika
vohl
bvk
tfcx
zvv
cixs
gpft
tpz
tpv
cniz
tyba
yohru
ibkmn
qqw
agotw
jjzz
odot
oywzk
hyi
cgbst
tdsv
etbl
igdlo
vintj
iil
jbtwh
hbfe
nyqng
isnbx
mcwq
kmyvh
cdlsw
m...

output:

52248

result:

ok single line: '52248'

Test #67:

score: 0
Accepted
time: 36ms
memory: 53428kb

input:

71585 1
vac
fzyer
apbf
kzy
tgcg
bvut
fgtxs
ktupq
timdr
yxzi
uzrv
iunsb
aiaz
walis
bbcng
navy
fdbsk
prhoe
hwln
izhah
hgr
hsz
tui
itlad
xqxod
cvsbr
jsrc
epvq
xwmro
gecro
wayn
eysbu
fdyq
iwoe
fudtl
pjw
rfqv
bbctu
kzgc
letm
sazgg
tnrah
gnlcv
lzdr
tyxxf
zfhne
vudpy
gfvrw
rgh
czq
fsznk
ypknp
ndo
ibm
wwxf
...

output:

71585

result:

ok single line: '71585'

Test #68:

score: 0
Accepted
time: 24ms
memory: 53300kb

input:

71730 2
hpql
onx
xxm
gxx
bzrec
ejdhm
yvdqh
ucbi
olbu
joxog
dbnk
mlm
eadzj
tnfr
hublk
yyqz
jdxe
sntcl
pydwe
vhuf
zpuxs
rdzbp
qzgnt
gqcqq
hwtj
umrwt
zadw
jav
ibp
amgao
kxadd
hyzbq
vlup
ipmp
ywnbc
lxczd
clv
siru
caob
dgeyf
fnlkg
ijefw
yngyi
jkvm
dnqcw
txjb
fkyh
mruh
mvmp
poje
vbns
seed
rzlc
cafua
swmof...

output:

52434

result:

ok single line: '52434'

Test #69:

score: 0
Accepted
time: 4ms
memory: 4696kb

input:

297 1
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

297

result:

ok single line: '297'

Test #70:

score: 0
Accepted
time: 8ms
memory: 4680kb

input:

305 1
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

305

result:

ok single line: '305'

Test #71:

score: 0
Accepted
time: 4ms
memory: 4664kb

input:

284 3
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

95

result:

ok single line: '95'

Test #72:

score: 0
Accepted
time: 0ms
memory: 4828kb

input:

303 9
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

34

result:

ok single line: '34'

Test #73:

score: 0
Accepted
time: 0ms
memory: 4892kb

input:

310 90
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

4

result:

ok single line: '4'

Test #74:

score: 0
Accepted
time: 2ms
memory: 4604kb

input:

299 979
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1

result:

ok single line: '1'

Test #75:

score: 0
Accepted
time: 2ms
memory: 4668kb

input:

311 1646
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1

result:

ok single line: '1'

Test #76:

score: 0
Accepted
time: 0ms
memory: 4884kb

input:

313 17076
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1

result:

ok single line: '1'

Test #77:

score: 0
Accepted
time: 2ms
memory: 4560kb

input:

319 208084
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa...

output:

1

result:

ok single line: '1'

Test #78:

score: 0
Accepted
time: 35ms
memory: 77616kb

input:

2 1
bbqrkoojrltrkdnfgsteefcntjcnsltsbmeptdmfpresjdkajmnjpeknrlosanefsocqjeajbrmngobtpkeabiopogeeticctdltnanjkgmsgqgoosdplqfanqonnbigedmphncmogberelbgpmdqrcbijlajbahpjsoiqdtiapespdjckmsosmnoqmmgqabjkkaasfjrejfatbtrrfreodkbefrjlhcqsaibraorsobqseholltcqbsmbmjdhnmtqaennbngoqajodogqrsodhprknnmiorrhnosnsl...

output:

2

result:

ok single line: '2'

Test #79:

score: 0
Accepted
time: 7ms
memory: 151720kb

input:

1 1
cieabretlogmkbnniripeefakhrchofqmlrgpbqdgjdbjfrgchrllfqqnblhlofanblgfpscrmmqtmjprpapigcbmcllseosteplemmschrbbdefqarelsddsqljqaofpqotbqfndgmoeokmgtjendjlsrrlhmqadkimoqmpftisegtjniadrgtemspljobrppssbtshqdnhpcqihjqcptrtlfaejiihdiedctsambbfajaahhooddadmifmrhatnoedgsodtkbgsihlkaemmbotjdrapqeoebfqckmq...

output:

1

result:

ok single line: '1'

Test #80:

score: 0
Accepted
time: 15ms
memory: 77676kb

input:

2 2
lfjjqqhbltidcoqehjmcsnhadetchkfmschceghcnlgpllgeffmglsffgtpjlarncsbdbpabggnrbpadhkdqgidohdppmckmimcrraijodesjaspfmlserircstmpdmkpfojkfhbpbsnisdbcqrtgaebrnfiisdgsnlleiqidjelqrknidptprqfdcomofgnajenbpgafipsalkbbebdgoaglmgnpoarhqqbcedjpellhpnqraegrhsreedrtjsitngtnklifbelhrogcgkebgorpfmjtiflnbfggoot...

output:

1

result:

ok single line: '1'

Test #81:

score: 0
Accepted
time: 21ms
memory: 53156kb

input:

3 3
cieabretlogmkbnniripeefakhrchofqmlrgpbqdgjdbjfrgchrllfqqnblhlofanblgfpscrmmqtmjprpapigcbmcllseosteplemmschrbbdefqarelsddsqljqaofpqotbqfndgmoeokmgtjendjlsrrlhmqadkimoqmpftisegtjniadrgtemspljobrppssbtshqdnhpcqihjqcptrtlfaejiihdiedctsambbfajaahhooddadmifmrhatnoedgsodtkbgsihlkaemmbotjdrapqeoebfqckmq...

output:

1

result:

ok single line: '1'

Test #82:

score: 0
Accepted
time: 19ms
memory: 151532kb

input:

1 2
okjdaoimgrrhafhnhirektlhojcsnqagmdthfrjlgtkchbgjakmimepkgtnksiriicmaqiqmplciirijnhjornimcomjfbikfbmnliqhkgecstegaqrbsbmflaobqggermbrkqcjikkccqhkmitcootgefdkiqefkksggpjenqndgkjbttjpmonmohgrllrqcpiqmqqoallnkikgamijbpgaiasbmslatkqffcqbjcaaokdgssqonfdmbgcqtganqfjhhkshsoqacimnfagehiajoskiehflfgoscntk...

output:

1

result:

ok single line: '1'

Test #83:

score: 0
Accepted
time: 32ms
memory: 52960kb

input:

3 1
obapjorhfmmjtdshtnjrfcksklechlcapbghdidainbbhbjqsbqrsphkmlpriskdjhjiitcdmpbjeijmcpmpadtoisobqhkpirrfiagojbsfhmpisqmkigfoqqtftmsgqgmpdnmskjrkcmdgprodianimoiskartrsjaqglktgtrkhanhidjttsqhrlmdijbdgsteckogfdqsfhoeheqngitebtjkgcmffmhcafqdhhktoijdpbhhtsiejggfimlskhqakmonhgojmffchikghidpfmpcfgbifajfsad...

output:

3

result:

ok single line: '3'

Test #84:

score: 0
Accepted
time: 15ms
memory: 40836kb

input:

4 2
gqgjjfieemtkscojsdnmcrecthfqojlkriqrtksastprmbcpcknritrgjaainpcdmetnhtqaepsllsfkmigiohaiblclqragpbbhftgsbaogjjsibrtmehtbsohkonlqcijgkodkjdagemadrfksrtdjsbtirdbneemribfgqelgnljbebckohthjnsckjpnebjrlckcemqipalsnghjptfeildflmtglroeetdfesnhtidlspetbloadoamhecjdrknssfreohhgtcdiijepqlirnbqihclkpfhsrbo...

output:

2

result:

ok single line: '2'

Test #85:

score: 0
Accepted
time: 24ms
memory: 53060kb

input:

3 1
lpttsggcjapchpcoljaaldcsnalilenglcqkdcnhmslpdondtcgpmpgsphmbgigsgsjlkhmntbrmnpnaklcsgoocdbrafnqfpcsabidlrfdhttbddkgfcamcpbjpqrqcoaqjlnokpbtkgpcqhgeefdtisgicrtbsgjjjiotqphgaltpeobbbtgenkmrnilpohfroebqmancfejdrgkpaccjherjnlbanrtktfocijpspjenoghnnqordfkagohbkgsddbpieaagkjecqhagcegroirslkcjbpnbfhiij...

output:

3

result:

ok single line: '3'

Test #86:

score: 0
Accepted
time: 24ms
memory: 77720kb

input:

2 1
rmbqndjnregltgfqakccrltlgcjdqcdlnephnaljekgrskbicspjhsgtcgrgotohajqakfigippaabqaknkoaoeqopaaorfltsdpikpanfadniodrllamlcfddtdofbpqnjflcjqdaqooegkroeshqckdgefkolfobrjrjikhdqrglamdmcljgsdpteiajfcrkrmmnitqrdhrhassjhidbeqhdrgdjcesnesngilrisbpfpmokcknsqgejttbecdndqilbinmcihboolqgcljlagsshnhfjbqtelcssm...

output:

2

result:

ok single line: '2'

Test #87:

score: 0
Accepted
time: 11ms
memory: 151580kb

input:

1 1
kgogadoirtftfpefeabclehdhoegcoqsgeeijfpsassehsiegdgemjscrpsdmchmcmfoqoihhrhhpdgifhgkjlaqiiggaotgbeqsdelkamjrhopchffprloemkikbqsrttttdbdlsnkqtqjpofmhgnerpffpcroqidptclmatiiskshbkcitqdsiaehjqnqnfshabgggifbdfcjmsghhsdtnesppahbbchggtfjbptrtltnqbghimratpeqpsnjqjlosnfgkilsokplhposaheamnoipgikpaoqjkqoe...

output:

1

result:

ok single line: '1'

Test #88:

score: 0
Accepted
time: 14ms
memory: 33280kb

input:

5 4
hfnhfbneglrbhfcmlpfrtbrnfkjmrpplanseckcfhseejpgamjejrhmdebfpfparsgcsskbkhntestfcgoosdjmclkoaqeedbmqldceaaspejrpqgsedcmplconiaakbohdfomlctctmkcftjtlsdrasmkigmdjocnpjgnlqmehegcnmtjolabonfjkdqntefhacsnmdplmatggmrierslpskpearqgnlgttrsclnpcnkogeqqfshpgkgltojmltknseltiqphpctinhmifprqmcbnhohconjqrgmohb...

output:

2

result:

ok single line: '2'

Test #89:

score: 0
Accepted
time: 12ms
memory: 52968kb

input:

3 4
qqnacprbobehtipsbgmgdlpkhilqhftikreonghdskaatcbbbmdfnhodkmflohcprtlsgrpgsjnmbhrlbdcjqihccbjlncibqiqcndeqmdappdfaecgbtghrfjroftridpjsclomqtkolqdmcmbcmfqcsfilsppbocmpgkrqiqsmidopqerrjhrhnndqsjnmtqnqpscdaskdjotbipakdirsqhpoqkckjmdtchoamqcjiljehnklkrihlsdnomoroaasbnejrkknssaqhkjfrdalosdfakckjfslmnit...

output:

1

result:

ok single line: '1'

Test #90:

score: 0
Accepted
time: 4ms
memory: 8348kb

input:

32 7
lrormlhldnkohnhoqrthegscbakqgqmhpniplgpferooflmgargmdhangqmglhcnbnfmkbrlqdbimffdqepqhhdrholhsfkomipddnaqermfhiphmgbdkjdqoignbodqjsqkdiroaobjgrdphlbbdtfkbrpngecjtccalqmpfocrpjgekrreifebhiecrbqemaibshohocoonodtdlqnhrclngelgnibrlbafmrrkegjqecptgofckpifibobmkidocslkahoqhbtqoaqknbtlhtijpkqfnbbodrqlf...

output:

9

result:

ok single line: '9'

Test #91:

score: 0
Accepted
time: 6ms
memory: 5868kb

input:

88 8
anscjbirolnhdafkbjdjedrlhjnlontmabskftplqelhpptceetkgqkfahqqgonpttlasfnmckfgqkafggjphbkrascnsisntnpmslqtsegetoracekpkjrjjeetbdlhtpqgfeeibbiacrisehmibdonppqnoelaidfjedrrmmlmgrjjakmgbgmrillpnjfecktkaqhdmnghtengcpcamislprogtfosditclbbtrjioprtdkpeqccdlnaqjtjnhstmjoohsaorcprrpltcbgratjkqleppmdkobqdf...

output:

22

result:

ok single line: '22'

Test #92:

score: 0
Accepted
time: 5ms
memory: 5692kb

input:

100 8
dapirqhbtipikottssejjdetflhhkincokrfmcplpapmrcqiplbshcehocpibqlgtmckllpgttgfdmkfcrfsoiqsjsdtlgjinmahhbdnqmaientqhcjkactpfddbpbaqifsqlelocpaakkpatfcfislanjitpdlrrnteepjjlpnadipsnaerrmcoqbmkiltekhaiaimggdgagdmetpmtjhgbanjapkcelhpcnqllmrfbnonpmosbjpspqfjqhtjligclrmkqcokjbohrbtpckeddrdmjojjghdeiib...

output:

25

result:

ok single line: '25'

Test #93:

score: 0
Accepted
time: 5ms
memory: 6452kb

input:

602 9
cacicfmladtsnhgjiaktepbkshrichgmhegbccfjmsnkfkhnqjplnelonjdeclnistcasrnggbaaoabpfmrmatcdfkqsgrfqpdggntlkqeiptpdigsssikstfcqqlqgtonrhcffbbgahiorbrasbhihtkictcskgcijnooemlrlpnnfnnjtnafmqhiqqrndthreirecfralcgofeljlipiktrgcbnbrrpkqrndahfkmnclqknbcjpomldifnettgeqtjnodtjqlbrqigkcqlagimpjpcojkrkelhtt...

output:

121

result:

ok single line: '121'

Test #94:

score: 0
Accepted
time: 5ms
memory: 5832kb

input:

408 8
dfeiingdhrprklkslfjfbgnpcmkklejjmqbmstihsmhjlehhpsdaofmkgaokodmossqlihfckeijfeoemasheqantkdfmorhijfhqaqoefffraafhpgqkkcllqfdhgshknaloghlbblhtnictqjmhssgkomomjlmcqtsbjpdidsqstllafaaklsaeljmthlroohpdgcojlekjtdhrcksmkstacecfnnstsrgtlakkagcbjsoplhpitmkcqnkritooqnhmiqltrbmbqsobifaddbbsoftkhtqijganj...

output:

88

result:

ok single line: '88'

Test #95:

score: 0
Accepted
time: 4ms
memory: 7524kb

input:

911 2
rktoblponatjhsrjodjdcdgahnaskacgleggtbcsbqbjcarjdnmankgfnlhndipnkbjiloadfmgsdibckkmdkberpimbkjngslshmnlkpgkaadhsigilltsqaetqckepkoacnhqbtddtcgmcissslrfiifmcihhihtioqpcimcpitipofjqihnlniggmedmposoknfhehtbigljmrpgbfmfljeetteroscrgqrjcejrbjsfqfffdnteoiancjjnobgffbfejbdngnsitkbtgllkpsdkkpqdagpqffq...

output:

619

result:

ok single line: '619'

Test #96:

score: 0
Accepted
time: 0ms
memory: 5380kb

input:

349 300000
feronnileamlmphalasnlioilkaelktlaghierlqihjjdrmfpkqasrtcioqfiqmettkchnqdtrlcgqprgfdmrajkpmanaefncjhkndlbbcndinnspehjqkdjrbmqeskghngcqhjtqrgdcnesqfmdliadsbnjslpasiklffrrplqbsplenhribpdpcmhtjmraitndffjfpahoabstbesgbblsodafemlqlgagnbohaafqqptkjpaposdktohifkrlrojgslabfdkjgggslphanneqbgqlhpfdb...

output:

1

result:

ok single line: '1'