See the problem statement here: [http://codeforces.com/contest/921/problem/01](//codeforces.com/contest/921/problem/01).
none
none
print("""
for-1 move-left end 
for-1 move-down end 
for-2 move-right end 
for-2 move-up end 
for-3 move-left end 
for-3 move-down end 
for-4 move-right end 
for-4 move-up end 
for-5 move-left end 
for-5 move-down end 
for-6 move-right end 
for-6 move-up end 
for-7 move-left end 
for-7 move-down end 
for-8 move-right end 
for-8 move-up end 
for-9 move-left end 
for-9 move-down end 
for-10 move-right end 
for-10 move-up end 
for-11 move-left end 
for-11 move-down end 
for-12 move-right end 
for-12 move-up end 
for-13 move-left end 
for-13 move-down end 
for-14 move-right end 
for-14 move-up end 
for-15 move-left end 
for-15 move-down end 
for-16 move-right end 
for-16 move-up end 
for-17 move-left end 
for-17 move-down end 
for-18 move-right end 
for-18 move-up end 
for-19 move-left end 
for-19 move-down end 
for-20 move-right end 
for-20 move-up end 
for-21 move-left end 
for-21 move-down end 
for-22 move-right end 
for-22 move-up end 
for-23 move-left end 
for-23 move-down end 
for-24 move-right end 
for-24 move-up end 
for-25 move-left end 
for-25 move-down end 
for-26 move-right end 
for-26 move-up end 
for-27 move-left end 
for-27 move-down end 
for-28 move-right end 
for-28 move-up end 
for-29 move-left end 
for-29 move-down end 
for-30 move-right end 
for-30 move-up end 
for-31 move-left end 
for-31 move-down end 
for-32 move-right end 
for-32 move-up end 
for-33 move-left end 
for-33 move-down end 
for-34 move-right end 
for-34 move-up end 
for-35 move-left end 
for-35 move-down end 
for-36 move-right end 
for-36 move-up end 
for-37 move-left end 
for-37 move-down end 
for-38 move-right end 
for-38 move-up end 
for-39 move-left end 
for-39 move-down end 
for-40 move-right end 
for-40 move-up end 
for-41 move-left end 
for-41 move-down end 
for-42 move-right end 
for-42 move-up end 
for-43 move-left end 
for-43 move-down end 
for-44 move-right end 
for-44 move-up end 
for-45 move-left end 
for-45 move-down end 
for-46 move-right end 
for-46 move-up end 
for-47 move-left end 
for-47 move-down end 
for-48 move-right end 
for-48 move-up end 
for-49 move-left end 
for-49 move-down end 
for-50 move-right end 
for-50 move-up end 
for-51 move-left end 
for-51 move-down end 
for-52 move-right end 
for-52 move-up end 
for-53 move-left end 
for-53 move-down end 
for-54 move-right end 
for-54 move-up end 
for-55 move-left end 
for-55 move-down end 
for-56 move-right end 
for-56 move-up end 
for-57 move-left end 
for-57 move-down end 
for-58 move-right end 
for-58 move-up end 
for-59 move-left end 
for-59 move-down end 
for-60 move-right end 
for-60 move-up end 
for-61 move-left end 
for-61 move-down end 
for-62 move-right end 
for-62 move-up end 
for-63 move-left end 
for-63 move-down end 
for-64 move-right end 
for-64 move-up end 
for-65 move-left end 
for-65 move-down end 
for-66 move-right end 
for-66 move-up end 
for-67 move-left end 
for-67 move-down end 
for-68 move-right end 
for-68 move-up end 
for-69 move-left end 
for-69 move-down end 
for-70 move-right end 
for-70 move-up end 
for-71 move-left end 
for-71 move-down end 
for-72 move-right end 
for-72 move-up end 
for-73 move-left end 
for-73 move-down end 
for-74 move-right end 
for-74 move-up end 
for-75 move-left end 
for-75 move-down end 
for-76 move-right end 
for-76 move-up end 
for-77 move-left end 
for-77 move-down end 
for-78 move-right end 
for-78 move-up end 
for-79 move-left end 
for-79 move-down end 
for-80 move-right end 
for-80 move-up end 
for-81 move-left end 
for-81 move-down end 
for-82 move-right end 
for-82 move-up end 
for-83 move-left end 
for-83 move-down end 
for-84 move-right end 
for-84 move-up end 
for-85 move-left end 
for-85 move-down end 
for-86 move-right end 
for-86 move-up end 
for-87 move-left end 
for-87 move-down end 
for-88 move-right end 
for-88 move-up end 
for-89 move-left end 
for-89 move-down end 
for-90 move-right end 
for-90 move-up end 
for-91 move-left end 
for-91 move-down end 
for-92 move-right end 
for-92 move-up end 
for-93 move-left end 
for-93 move-down end 
for-94 move-right end 
for-94 move-up end 
for-95 move-left end 
for-95 move-down end 
for-96 move-right end 
for-96 move-up end 
for-97 move-left end 
for-97 move-down end 
for-98 move-right end 
for-98 move-up end 
for-99 move-left end 
for-99 move-down end 
for-100 move-right end 
for-100 move-up end 
for-101 move-left end 
for-101 move-down end 
for-102 move-right end 
for-102 move-up end 
for-103 move-left end 
for-103 move-down end 
for-104 move-right end 
for-104 move-up end 
for-105 move-left end 
for-105 move-down end 
for-106 move-right end 
for-106 move-up end 
for-107 move-left end 
for-107 move-down end 
for-108 move-right end 
for-108 move-up end 
for-109 move-left end 
for-109 move-down end 
for-110 move-right end 
for-110 move-up end 
for-111 move-left end 
for-111 move-down end 
for-112 move-right end 
for-112 move-up end 
for-113 move-left end 
for-113 move-down end 
for-114 move-right end 
for-114 move-up end 
for-115 move-left end 
for-115 move-down end 
for-116 move-right end 
for-116 move-up end 
for-117 move-left end 
for-117 move-down end 
for-118 move-right end 
for-118 move-up end 
for-119 move-left end 
for-119 move-down end 
for-120 move-right end 
for-120 move-up end 
for-121 move-left end 
for-121 move-down end 
for-122 move-right end 
for-122 move-up end 
for-123 move-left end 
for-123 move-down end 
for-124 move-right end 
for-124 move-up end 
for-125 move-left end 
for-125 move-down end 
for-126 move-right end 
for-126 move-up end 
for-127 move-left end 
for-127 move-down end 
for-128 move-right end 
for-128 move-up end 
for-129 move-left end 
for-129 move-down end 
for-130 move-right end 
for-130 move-up end 
for-131 move-left end 
for-131 move-down end 
for-132 move-right end 
for-132 move-up end 
for-133 move-left end 
for-133 move-down end 
for-134 move-right end 
for-134 move-up end 
for-135 move-left end 
for-135 move-down end 
for-136 move-right end 
for-136 move-up end 
for-137 move-left end 
for-137 move-down end 
for-138 move-right end 
for-138 move-up end 
for-139 move-left end 
for-139 move-down end 
for-140 move-right end 
for-140 move-up end 
for-141 move-left end 
for-141 move-down end 
for-142 move-right end 
for-142 move-up end 
for-143 move-left end 
for-143 move-down end 
for-144 move-right end 
for-144 move-up end 
for-145 move-left end 
for-145 move-down end 
for-146 move-right end 
for-146 move-up end 
for-147 move-left end 
for-147 move-down end 
for-148 move-right end 
for-148 move-up end 
for-149 move-left end 
for-149 move-down end 
for-150 move-right end 
for-150 move-up end 
for-151 move-left end 
for-151 move-down end 
for-152 move-right end 
for-152 move-up end 
for-153 move-left end 
for-153 move-down end 
for-154 move-right end 
for-154 move-up end 
for-155 move-left end 
for-155 move-down end 
for-156 move-right end 
for-156 move-up end 
for-157 move-left end 
for-157 move-down end 
for-158 move-right end 
for-158 move-up end 
for-159 move-left end 
for-159 move-down end 
for-160 move-right end 
for-160 move-up end 
for-161 move-left end 
for-161 move-down end 
for-162 move-right end 
for-162 move-up end 
for-163 move-left end 
for-163 move-down end 
for-164 move-right end 
for-164 move-up end 
for-165 move-left end 
for-165 move-down end 
for-166 move-right end 
for-166 move-up end 
for-167 move-left end 
for-167 move-down end 
for-168 move-right end 
for-168 move-up end 
for-169 move-left end 
for-169 move-down end 
for-170 move-right end 
for-170 move-up end 
for-171 move-left end 
for-171 move-down end 
for-172 move-right end 
for-172 move-up end 
for-173 move-left end 
for-173 move-down end 
for-174 move-right end 
for-174 move-up end 
for-175 move-left end 
for-175 move-down end 
for-176 move-right end 
for-176 move-up end 
for-177 move-left end 
for-177 move-down end 
for-178 move-right end 
for-178 move-up end 
for-179 move-left end 
for-179 move-down end 
for-180 move-right end 
for-180 move-up end 
for-181 move-left end 
for-181 move-down end 
for-182 move-right end 
for-182 move-up end 
for-183 move-left end 
for-183 move-down end 
for-184 move-right end 
for-184 move-up end 
for-185 move-left end 
for-185 move-down end 
for-186 move-right end 
for-186 move-up end 
for-187 move-left end 
for-187 move-down end 
for-188 move-right end 
for-188 move-up end 
for-189 move-left end 
for-189 move-down end 
for-190 move-right end 
for-190 move-up end 
for-191 move-left end 
for-191 move-down end 
for-192 move-right end 
for-192 move-up end 
for-193 move-left end 
for-193 move-down end 
for-194 move-right end 
for-194 move-up end 
for-195 move-left end 
for-195 move-down end 
for-196 move-right end 
for-196 move-up end 
for-197 move-left end 
for-197 move-down end 
for-198 move-right end 
for-198 move-up end 
for-199 move-left end 
for-199 move-down end 
for-200 move-right end 
for-200 move-up end 
for-201 move-left end 
for-201 move-down end 
for-202 move-right end 
for-202 move-up end 
for-203 move-left end 
for-203 move-down end 
for-204 move-right end 
for-204 move-up end 
for-205 move-left end 
for-205 move-down end 
for-206 move-right end 
for-206 move-up end 
for-207 move-left end 
for-207 move-down end 
for-208 move-right end 
for-208 move-up end 
for-209 move-left end 
for-209 move-down end 
for-210 move-right end 
for-210 move-up end 
for-211 move-left end 
for-211 move-down end 
for-212 move-right end 
for-212 move-up end 
for-213 move-left end 
for-213 move-down end 
for-214 move-right end 
for-214 move-up end 
for-215 move-left end 
for-215 move-down end 
for-216 move-right end 
for-216 move-up end 
for-217 move-left end 
for-217 move-down end 
for-218 move-right end 
for-218 move-up end 
for-219 move-left end 
for-219 move-down end 
for-220 move-right end 
for-220 move-up end 
for-221 move-left end 
for-221 move-down end 
for-222 move-right end 
for-222 move-up end 
for-223 move-left end 
for-223 move-down end 
for-224 move-right end 
for-224 move-up end 
for-225 move-left end 
for-225 move-down end 
for-226 move-right end 
for-226 move-up end 
for-227 move-left end 
for-227 move-down end 
for-228 move-right end 
for-228 move-up end 
for-229 move-left end 
for-229 move-down end 
for-230 move-right end 
for-230 move-up end 
for-231 move-left end 
for-231 move-down end 
for-232 move-right end 
for-232 move-up end 
for-233 move-left end 
for-233 move-down end 
for-234 move-right end 
for-234 move-up end 
for-235 move-left end 
for-235 move-down end 
for-236 move-right end 
for-236 move-up end 
for-237 move-left end 
for-237 move-down end 
for-238 move-right end 
for-238 move-up end 
for-239 move-left end 
for-239 move-down end 
for-240 move-right end 
for-240 move-up end 
for-241 move-left end 
for-241 move-down end 
for-242 move-right end 
for-242 move-up end 
for-243 move-left end 
for-243 move-down end 
for-244 move-right end 
for-244 move-up end 
for-245 move-left end 
for-245 move-down end 
for-246 move-right end 
for-246 move-up end 
for-247 move-left end 
for-247 move-down end 
for-248 move-right end 
for-248 move-up end 
for-249 move-left end 
for-249 move-down end 
for-250 move-right end 
for-250 move-up end 
for-251 move-left end 
for-251 move-down end 
for-252 move-right end 
for-252 move-up end 
for-253 move-left end 
for-253 move-down end 
for-254 move-right end 
for-254 move-up end 
for-255 move-left end 
for-255 move-down end 
for-256 move-right end 
for-256 move-up end 
for-257 move-left end 
for-257 move-down end 
for-258 move-right end 
for-258 move-up end 
for-259 move-left end 
for-259 move-down end 
for-260 move-right end 
for-260 move-up end 
for-261 move-left end 
for-261 move-down end 
for-262 move-right end 
for-262 move-up end 
for-263 move-left end 
for-263 move-down end 
for-264 move-right end 
for-264 move-up end 
for-265 move-left end 
for-265 move-down end 
for-266 move-right end 
for-266 move-up end 
for-267 move-left end 
for-267 move-down end 
for-268 move-right end 
for-268 move-up end 
for-269 move-left end 
for-269 move-down end 
for-270 move-right end 
for-270 move-up end 
for-271 move-left end 
for-271 move-down end 
for-272 move-right end 
for-272 move-up end 
for-273 move-left end 
for-273 move-down end 
for-274 move-right end 
for-274 move-up end 
for-275 move-left end 
for-275 move-down end 
for-276 move-right end 
for-276 move-up end 
for-277 move-left end 
for-277 move-down end 
for-278 move-right end 
for-278 move-up end 
for-279 move-left end 
for-279 move-down end 
for-280 move-right end 
for-280 move-up end 
for-281 move-left end 
for-281 move-down end 
for-282 move-right end 
for-282 move-up end 
for-283 move-left end 
for-283 move-down end 
for-284 move-right end 
for-284 move-up end 
for-285 move-left end 
for-285 move-down end 
for-286 move-right end 
for-286 move-up end 
for-287 move-left end 
for-287 move-down end 
for-288 move-right end 
for-288 move-up end 
for-289 move-left end 
for-289 move-down end 
for-290 move-right end 
for-290 move-up end 
for-291 move-left end 
for-291 move-down end 
for-292 move-right end 
for-292 move-up end 
for-293 move-left end 
for-293 move-down end 
for-294 move-right end 
for-294 move-up end 
for-295 move-left end 
for-295 move-down end 
for-296 move-right end 
for-296 move-up end 
for-297 move-left end 
for-297 move-down end 
for-298 move-right end 
for-298 move-up end 
for-299 move-left end 
for-299 move-down end 
for-300 move-right end 
for-300 move-up end 
for-301 move-left end 
for-301 move-down end 
for-302 move-right end 
for-302 move-up end 
for-303 move-left end 
for-303 move-down end 
for-304 move-right end 
for-304 move-up end 
for-305 move-left end 
for-305 move-down end 
for-306 move-right end 
for-306 move-up end 
for-307 move-left end 
for-307 move-down end 
for-308 move-right end 
for-308 move-up end 
for-309 move-left end 
for-309 move-down end 
for-310 move-right end 
for-310 move-up end 
for-311 move-left end 
for-311 move-down end 
for-312 move-right end 
for-312 move-up end 
for-313 move-left end 
for-313 move-down end 
for-314 move-right end 
for-314 move-up end 
for-315 move-left end 
for-315 move-down end 
for-316 move-right end 
for-316 move-up end 
for-317 move-left end 
for-317 move-down end 
for-318 move-right end 
for-318 move-up end 
for-319 move-left end 
for-319 move-down end 
for-320 move-right end 
for-320 move-up end 
for-321 move-left end 
for-321 move-down end 
for-322 move-right end 
for-322 move-up end 
for-323 move-left end 
for-323 move-down end 
for-324 move-right end 
for-324 move-up end 
for-325 move-left end 
for-325 move-down end 
for-326 move-right end 
for-326 move-up end 
for-327 move-left end 
for-327 move-down end 
for-328 move-right end 
for-328 move-up end 
for-329 move-left end 
for-329 move-down end 
for-330 move-right end 
for-330 move-up end 
for-331 move-left end 
for-331 move-down end 
for-332 move-right end 
for-332 move-up end 
for-333 move-left end 
for-333 move-down end 
for-334 move-right end 
for-334 move-up end 
for-335 move-left end 
for-335 move-down end 
for-336 move-right end 
for-336 move-up end 
for-337 move-left end 
for-337 move-down end 
for-338 move-right end 
for-338 move-up end 
for-339 move-left end 
for-339 move-down end 
for-340 move-right end 
for-340 move-up end 
for-341 move-left end 
for-341 move-down end 
for-342 move-right end 
for-342 move-up end 
for-343 move-left end 
for-343 move-down end 
for-344 move-right end 
for-344 move-up end 
for-345 move-left end 
for-345 move-down end 
for-346 move-right end 
for-346 move-up end 
for-347 move-left end 
for-347 move-down end 
for-348 move-right end 
for-348 move-up end 
for-349 move-left end 
for-349 move-down end 
for-350 move-right end 
for-350 move-up end 
for-351 move-left end 
for-351 move-down end 
for-352 move-right end 
for-352 move-up end 
for-353 move-left end 
for-353 move-down end 
for-354 move-right end 
for-354 move-up end 
for-355 move-left end 
for-355 move-down end 
for-356 move-right end 
for-356 move-up end 
for-357 move-left end 
for-357 move-down end 
for-358 move-right end 
for-358 move-up end 
for-359 move-left end 
for-359 move-down end 
for-360 move-right end 
for-360 move-up end 
for-361 move-left end 
for-361 move-down end 
for-362 move-right end 
for-362 move-up end 
for-363 move-left end 
for-363 move-down end 
for-364 move-right end 
for-364 move-up end 
for-365 move-left end 
for-365 move-down end 
for-366 move-right end 
for-366 move-up end 
for-367 move-left end 
for-367 move-down end 
for-368 move-right end 
for-368 move-up end 
for-369 move-left end 
for-369 move-down end 
for-370 move-right end 
for-370 move-up end 
for-371 move-left end 
for-371 move-down end 
for-372 move-right end 
for-372 move-up end 
for-373 move-left end 
for-373 move-down end 
for-374 move-right end 
for-374 move-up end 
for-375 move-left end 
for-375 move-down end 
for-376 move-right end 
for-376 move-up end 
for-377 move-left end 
for-377 move-down end 
for-378 move-right end 
for-378 move-up end 
for-379 move-left end 
for-379 move-down end 
for-380 move-right end 
for-380 move-up end 
for-381 move-left end 
for-381 move-down end 
for-382 move-right end 
for-382 move-up end 
for-383 move-left end 
for-383 move-down end 
for-384 move-right end 
for-384 move-up end 
for-385 move-left end 
for-385 move-down end 
for-386 move-right end 
for-386 move-up end 
for-387 move-left end 
for-387 move-down end 
for-388 move-right end 
for-388 move-up end 
for-389 move-left end 
for-389 move-down end 
for-390 move-right end 
for-390 move-up end 
for-391 move-left end 
for-391 move-down end 
for-392 move-right end 
for-392 move-up end 
for-393 move-left end 
for-393 move-down end 
for-394 move-right end 
for-394 move-up end 
for-395 move-left end 
for-395 move-down end 
for-396 move-right end 
for-396 move-up end 
for-397 move-left end 
for-397 move-down end 
for-398 move-right end 
for-398 move-up end 
for-399 move-left end 
for-399 move-down end 
for-400 move-right end 
for-400 move-up end 
for-401 move-left end 
for-401 move-down end 
for-402 move-right end 
for-402 move-up end 
for-403 move-left end 
for-403 move-down end 
for-404 move-right end 
for-404 move-up end 
for-405 move-left end 
for-405 move-down end 
for-406 move-right end 
for-406 move-up end 
for-407 move-left end 
for-407 move-down end 
for-408 move-right end 
for-408 move-up end 
for-409 move-left end 
for-409 move-down end 
for-410 move-right end 
for-410 move-up end 
for-411 move-left end 
for-411 move-down end 
for-412 move-right end 
for-412 move-up end 
for-413 move-left end 
for-413 move-down end 
for-414 move-right end 
for-414 move-up end 
for-415 move-left end 
for-415 move-down end 
for-416 move-right end 
for-416 move-up end 
for-417 move-left end 
for-417 move-down end 
for-418 move-right end 
for-418 move-up end 
for-419 move-left end 
for-419 move-down end 
for-420 move-right end 
for-420 move-up end 
for-421 move-left end 
for-421 move-down end 
for-422 move-right end 
for-422 move-up end 
for-423 move-left end 
for-423 move-down end 
for-424 move-right end 
for-424 move-up end 
for-425 move-left end 
for-425 move-down end 
for-426 move-right end 
for-426 move-up end 
for-427 move-left end 
for-427 move-down end 
for-428 move-right end 
for-428 move-up end 
for-429 move-left end 
for-429 move-down end 
for-430 move-right end 
for-430 move-up end 
for-431 move-left end 
for-431 move-down end 
for-432 move-right end 
for-432 move-up end 
for-433 move-left end 
for-433 move-down end 
for-434 move-right end 
for-434 move-up end 
for-435 move-left end 
for-435 move-down end 
for-436 move-right end 
for-436 move-up end 
for-437 move-left end 
for-437 move-down end 
for-438 move-right end 
for-438 move-up end 
for-439 move-left end 
for-439 move-down end 
for-440 move-right end 
for-440 move-up end 
for-441 move-left end 
for-441 move-down end 
for-442 move-right end 
for-442 move-up end 
for-443 move-left end 
for-443 move-down end 
for-444 move-right end 
for-444 move-up end 
for-445 move-left end 
for-445 move-down end 
for-446 move-right end 
for-446 move-up end 
for-447 move-left end 
for-447 move-down end 
for-448 move-right end 
for-448 move-up end 
for-449 move-left end 
for-449 move-down end 
for-450 move-right end 
for-450 move-up end 
for-451 move-left end 
for-451 move-down end 
for-452 move-right end 
for-452 move-up end 
for-453 move-left end 
for-453 move-down end 
for-454 move-right end 
for-454 move-up end 
for-455 move-left end 
for-455 move-down end 
for-456 move-right end 
for-456 move-up end 
for-457 move-left end 
for-457 move-down end 
for-458 move-right end 
for-458 move-up end 
for-459 move-left end 
for-459 move-down end 
for-460 move-right end 
for-460 move-up end 
for-461 move-left end 
for-461 move-down end 
for-462 move-right end 
for-462 move-up end 
for-463 move-left end 
for-463 move-down end 
for-464 move-right end 
for-464 move-up end 
for-465 move-left end 
for-465 move-down end 
for-466 move-right end 
for-466 move-up end 
for-467 move-left end 
for-467 move-down end 
for-468 move-right end 
for-468 move-up end 
for-469 move-left end 
for-469 move-down end 
for-470 move-right end 
for-470 move-up end 
for-471 move-left end 
for-471 move-down end 
for-472 move-right end 
for-472 move-up end 
for-473 move-left end 
for-473 move-down end 
for-474 move-right end 
for-474 move-up end 
for-475 move-left end 
for-475 move-down end 
for-476 move-right end 
for-476 move-up end 
for-477 move-left end 
for-477 move-down end 
for-478 move-right end 
for-478 move-up end 
for-479 move-left end 
for-479 move-down end 
for-480 move-right end 
for-480 move-up end 
for-481 move-left end 
for-481 move-down end 
for-482 move-right end 
for-482 move-up end 
for-483 move-left end 
for-483 move-down end 
for-484 move-right end 
for-484 move-up end 
for-485 move-left end 
for-485 move-down end 
for-486 move-right end 
for-486 move-up end 
for-487 move-left end 
for-487 move-down end 
for-488 move-right end 
for-488 move-up end 
for-489 move-left end 
for-489 move-down end 
for-490 move-right end 
for-490 move-up end 
for-491 move-left end 
for-491 move-down end 
for-492 move-right end 
for-492 move-up end 
for-493 move-left end 
for-493 move-down end 
for-494 move-right end 
for-494 move-up end 
for-495 move-left end 
for-495 move-down end 
for-496 move-right end 
for-496 move-up end 
for-497 move-left end 
for-497 move-down end 
for-498 move-right end 
for-498 move-up end 
for-499 move-left end 
for-499 move-down end 
for-500 move-right end 
for-500 move-up end 
for-500 move-left end 
""")