#C6031. Secure Password Generator

    ID: 49747 Type: Default 1000ms 256MiB

Secure Password Generator

Secure Password Generator

You are given an integer n and your task is to generate n unique secure passwords. Each generated password must satisfy all the following conditions:

  • It contains at least one uppercase letter.
  • It contains at least one lowercase letter.
  • It contains at least one digit.
  • It contains at least one special character from the set \(\{!,@,#,\$,%,\^,&,*,(,),-,\+\}\).
  • Its length is at least 8 characters.

The passwords must be unique and printed one per line.

Note: In this problem the generation of the password is made deterministic. You must use the following deterministic construction for the i-th password (with 0-based index):

\[ \text{password}_i = U[i\%26] \;||\; L[i\%26] \;||\; D[i\%10] \;||\; S[i\%12] \;||\; \texttt{aBz} \;||\; i \] where:

  • \(U\) is the string of uppercase letters "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
  • \(L\) is the string of lowercase letters "abcdefghijklmnopqrstuvwxyz".
  • \(D\) is the string of digits "0123456789".
  • \(S\) is the string of special characters "!@#$%^&*()-+".
  • The operator \(||\) denotes string concatenation.

This construction guarantees that each password has exactly the following structure:

One uppercase letter, one lowercase letter, one digit, one special character, the fixed string "aBz", and the index i (in decimal)

inputFormat

The input consists of a single integer n (provided via stdin) which indicates the number of secure passwords to generate.

outputFormat

Output exactly n lines (to stdout), each containing one secure password that satisfies the criteria.

## sample
1
Aa0!aBz0