#K4276. Generate Unique Alphanumeric Keys
Generate Unique Alphanumeric Keys
Generate Unique Alphanumeric Keys
You are given T test cases. For each test case, you are provided with two integers: N and L. Your task is to generate N unique alphanumeric keys, each exactly of length L. The allowed characters include uppercase letters, lowercase letters, and digits. Formally, the length of each key is given by ( L ) and you need to produce ( N ) keys such that for any two keys ( key_i ) and ( key_j ) within the same test case (with ( i \neq j )), ( key_i \neq key_j ). To ensure reproducibility, use a fixed seed (42) for your pseudo‐random generator.
inputFormat
Input is read from standard input (stdin). The first line contains an integer T, the number of test cases. Each of the following T lines contains two space‐separated integers: N (the number of keys to generate) and L (the length of each key).
outputFormat
For each test case, output one line to standard output (stdout) containing N space‐separated alphanumeric keys of length L. Each key must be unique within its test case.## sample
2
3 8
2 5
Any valid output that meets the requirements (i.e. two lines where the first line contains 3 keys of length 8 separated by spaces and the second line contains 2 keys of length 5 separated by spaces)