{"raw_statement":[{"iden":"statement","content":"A new innovative ticketing systems for public transport is introduced in Bytesburg. Now there is a single travel card for all transport. To make a trip a passenger scan his card and then he is charged according to the fare.\n\nThe fare is constructed in the following manner. There are three types of tickets:\n\n1.  a ticket for one trip costs 20 byteland rubles,\n2.  a ticket for 90 minutes costs 50 byteland rubles,\n3.  a ticket for one day (1440 minutes) costs 120 byteland rubles.\n\nNote that a ticket for _x_ minutes activated at time _t_ can be used for trips started in time range from _t_ to _t_ + _x_ - 1, inclusive. Assume that all trips take exactly one minute.\n\nTo simplify the choice for the passenger, the system automatically chooses the optimal tickets. After each trip starts, the system analyses all the previous trips and the current trip and chooses a set of tickets for these trips with a minimum total cost. Let the minimum total cost of tickets to cover all trips from the first to the current is _a_, and the total sum charged before is _b_. Then the system charges the passenger the sum _a_ - _b_.\n\nYou have to write a program that, for given trips made by a passenger, calculates the sum the passenger is charged after each trip."},{"iden":"input","content":"The first line of input contains integer number _n_ (1 ≤ _n_ ≤ 105) — the number of trips made by passenger.\n\nEach of the following _n_ lines contains the time of trip _t__i_ (0 ≤ _t__i_ ≤ 109), measured in minutes from the time of starting the system. All _t__i_ are different, given in ascending order, i. e. _t__i_ + 1 > _t__i_ holds for all 1 ≤ _i_ < _n_."},{"iden":"output","content":"Output _n_ integers. For each trip, print the sum the passenger is charged after it."},{"iden":"examples","content":"Input\n\n3\n10\n20\n30\n\nOutput\n\n20\n20\n10\n\nInput\n\n10\n13\n45\n46\n60\n103\n115\n126\n150\n256\n516\n\nOutput\n\n20\n20\n10\n0\n20\n0\n0\n20\n20\n10"},{"iden":"note","content":"In the first example, the system works as follows: for the first and second trips it is cheaper to pay for two one-trip tickets, so each time 20 rubles is charged, after the third trip the system understands that it would be cheaper to buy a ticket for 90 minutes. This ticket costs 50 rubles, and the passenger had already paid 40 rubles, so it is necessary to charge 10 rubles only."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}