CF1336D Yui and Mahjong Set

Description

This is an interactive problem. Yui is a girl who enjoys playing Mahjong. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1336D/ba021191f7d362712a9889299b0ae5ce432eaf4f.png)She has a mysterious set which consists of tiles (this set can be empty). Each tile has an integer value between $ 1 $ and $ n $ , and at most $ n $ tiles in the set have the same value. So the set can contain at most $ n^2 $ tiles. You want to figure out which values are on the tiles. But Yui is shy, she prefers to play a guessing game with you. Let's call a set consisting of three tiles triplet if their values are the same. For example, $ \{2,\,2,\,2\} $ is a triplet, but $ \{2,\,3,\,3\} $ is not. Let's call a set consisting of three tiles straight if their values are consecutive integers. For example, $ \{2,\,3,\,4\} $ is a straight, but $ \{1,\,3,\,5\} $ is not. At first, Yui gives you the number of triplet subsets and straight subsets of the initial set respectively. After that, you can insert a tile with an integer value between $ 1 $ and $ n $ into the set at most $ n $ times. Every time you insert a tile, you will get the number of triplet subsets and straight subsets of the current set as well. Note that two tiles with the same value are treated different. In other words, in the set $ \{1,\,1,\,2,\,2,\,3\} $ you can find $ 4 $ subsets $ \{1,\,2,\,3\} $ . Try to guess the number of tiles in the initial set with value $ i $ for all integers $ i $ from $ 1 $ to $ n $ .

Input Format

N/A

Output Format

N/A

Explanation/Hint

In the first test, the initial set of tiles is $ \{1, 1, 2, 3, 3, 3, 5, 5\} $ . It has only one triplet subset $ \{3, 3, 3\} $ and six straight subsets, all equal to $ \{1, 2, 3\} $ . After inserting a tile with value $ 1 $ the set of tiles will be $ \{1, 1, 1, 2, 3, 3, 3, 5, 5\} $ and will have two triplet subsets $ \{1, 1, 1\} $ , $ \{3, 3, 3\} $ and nine straight subsets, all equal to $ \{1, 2, 3\} $ .