GeeksforGeeks New System
Submissions: 1054   Accuracy:

41.03%

  Difficulty: Easy   Marks: 2

GeeksforGeeks developed its new system to make sure no two usernames are same. So, they selected you as a developer to develop the system. They have set some rules to do the same.
Rules are pretty simple: If you see the same username that already exists, just add a number at the end of that username (number starting from 1), else you will toast "Verified".

Input:
First line of the input contains an integer T denoting the number of test cases. Then T test cases follow. First line of every test case consists of an integer N, denoting number of usernames. Second line of every test case consists of N spaced separated Strings, denoting usernames(only lowercase letters).

Output:
Corresponding to each test case, print the required output in a new line.

Constraints:
1<=T<=100
1<=N<=10^5
1<=|String|<=10^3

Example:
Input:
2
4
abc aab abc aba
5
abc abc aab aab abc
Output:
Verified Verified abc1 Verified
Verified abc1 Verified aab1 abc2

** For More Input/Output Examples Use 'Expected Output' option **

Author: Contribute.Practice


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.