CSCI-101: Intro to Computer Science
Python Course

Bijele

Mirko has found an old chessboard and a set of pieces in his attic. Unfortunately, the set contains only white pieces, and apparently an incorrect number of them. A set of pieces should contain:

  • One king
  • One queen
  • Two rooks
  • Two bishops
  • Two knights
  • Eight pawns

Mirko would like to know how many pieces of each type he should add or remove to make a valid set.

Input

The input consists of 6 integers, all separate lines, each between 0 and 10 (inclusive). The numbers are, in order, the numbers of kings, queens, rooks, bishops, knights and pawns in the set Mirko found.

Output

Output should consist of 6 integers on a single line; the number of pieces of each type Mirko should add or remove. If a number is positive, Mirko needs to add that many pieces. If a number is negative, Mirko needs to remove pieces.

Lab I/O Format

Your program should use the Lab Input/Output Format, as described below:

  • When prompting for input, use the prompt string WORD>, where WORD is a single, uppercase word which describes the input. For example, this lab you might choose two: KINGS>, QUEENS>, etc.
  • When providing output that will be graded, start the line with OUTPUT. Think of this as "boxing your answer" on a math worksheet, it lets us quickly find your answer. We will ignore any lines which do not start with OUTPUT.
  • You may interleave the inputs and outputs in any order you wish. For example, you might want to recieve all of your inputs (order of inputs still matters!), then print all of your outputs (order of outputs still matters!), or you might want to do input/output, input/output, etc. For this lab, this will be unimportant, but know that you will have this freedom later on.

Example Interaction 1

KINGS> 0
QUEENS> 1
ROOKS> 2
BISHOPS> 2
KNIGHTS> 2
PAWNS> 7
OUTPUT 1 0 0 0 0 1

Example Interaction 2

KINGS> 2
QUEENS> 1
ROOKS> 2
BISHOPS> 1
KNIGHTS> 2
PAWNS> 1
OUTPUT -1 0 0 1 0 7

License

This problem was derived from a problem from the Croatian Open Competition in Informatics 2007/2008, contest #2. License is for educational use only.