3372
Problem ID: 3372
ACM (ACronym Maker)

Hints
ACM-ICPC Live Archive Single Output Problem
Since the sample input on ACM-ICPC Live Archive is wrong, the correct one has been uploaded on uDebug.
Check out #Robbinb1993's amazing tool with the #uDebug API here: https://udebugtool.com/