CF34E Collisions

Description

On a number line there are $ n $ balls. At time moment $ 0 $ for each ball the following data is known: its coordinate $ x_{i} $ , speed $ v_{i} $ (possibly, negative) and weight $ m_{i} $ . The radius of the balls can be ignored. The balls collide elastically, i.e. if two balls weighing $ m_{1} $ and $ m_{2} $ and with speeds $ v_{1} $ and $ v_{2} $ collide, their new speeds will be: ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF34E/939b5bce3bf45a602cb8d3e9f25a3ee89c788ac0.png).Your task is to find out, where each ball will be $ t $ seconds after.

Input Format

The first line contains two integers $ n $ and $ t $ ( $ 1

Output Format

Output $ n $ numbers — coordinates of the balls $ t $ seconds after. Output the numbers accurate to at least 4 digits after the decimal point.