This page is still under construction.

Parts of this page are still being built. What you see may change.

Gradabase

Time limit3sMemory limit128 MB

Summary
Add one to every grade and print only students remaining in grades 1 to 6 for each case.
Level

Easy1 of 10

Topics
Implementation, Array
Solved
No attempts yet

Problem

The school year is over at Hunt Valley Elementary. Everyone passed, so everyone moves up one grade and the database has to be updated. Kindergarten is stored as 0, first grade as 1, and so on. Hunt Valley Elementary teaches kindergarten through sixth grade. Print the new grade level only for the students who are still at Hunt Valley Elementary.

Input

The first line contains nn, the number of test cases. Each case starts with mm, the number of entries in that case, followed by mm integers between 0 and 6, each on its own line. There are 1 to 500 test cases with 1 to 500 students per case.

Output

For each case, print the line Case x: on a line of its own, where xx is the case number. Then print the updated grade levels, each on a new line. Every printed value is between 1 and 6. A student who has graduated from the school is not printed.

Examples1

  1. Example 1

    Input
    3
    10
    6
    1
    2
    3
    6
    6
    6
    1
    0
    0
    2
    1
    1
    1
    6
    
    Expected output
    Case 1:
    2
    3
    4
    2
    1
    1
    Case 2:
    2
    2
    Case 3: