Time Limit: 1000 ms
Memory Limit: 65535 ms
When WAVwind is writing AI for Turing Cup, he comes across a problem: a tank is a square of four units in the map. He knows both positions of his and the enemies’ tank, also, he know the information of the whole map. WAVwind want to approach the enemies’ tanks as soon as possible, but because of the actions of enemies being unsure, he suppose their tanks are static. Please find the minimum steps of the way from present location to the enemy’s location and the direction which should be selected if you choose the minimum way.(“UP” represents moving up, “DOWN” represents moving down, “LEFT” represents moving left, “RIGHT” represents moving right.If the direction is nonunique ,print the one which is the max("UP">"DOWN">"LEFT">"RIGHT" ) ). Attention please, the tank can only moves up, down, left, right only one unit.