#C13870. Unique API Key Generator

    ID: 43456 Type: Default 1000ms 256MiB

Unique API Key Generator

Unique API Key Generator

You are given an integer ( N ). Your task is to generate an API key string that satisfies the following constraints:

  1. The key must be exactly of length ( N ).
  2. It must include at least one uppercase letter, one lowercase letter, and one digit.
  3. All characters must be alphanumeric (i.e., only letters and digits).
  4. No character should appear more than twice consecutively.

    If ( N < 3 ), output an empty string.

inputFormat

The input consists of a single integer ( N ) representing the desired length of the API key. The input is read from standard input (stdin).

outputFormat

Output a valid API key of length ( N ) that meets all the conditions described above, printed to standard output (stdout). If ( N < 3 ), output an empty string.## sample

2