#include int f[384][512][4]; #define Y(x,y) f[y][x][0] #define U(x,y) f[y][x][1] #define V(x,y) f[y][x][2] #define Y2(x,y) f[y][x][3] void FOUT (float f) { int c = f; if (c < 0) c = 0; if (c > 255) c = 255; putchar (c); } main () { int x, y, i; FILE *w = stdin; for (y = 0; y < 384; ++y) { for (x = 0; x < 512; ++x) { Y (x, y) = getc (w); U (x, y) = getc (w); } for (x = 0; x < 512; ++x) { V (x, y) = getc (w); Y2 (x, y) = getc (w); } } printf ("P6\n1024 768\n255\n"); for (y = 0; y < 384; ++y) { for (x = 0; x < 512; ++x) { putchar (U (x, y)); putchar (Y (x, y)); putchar (V (x, y)); putchar (U (x, y)); putchar (Y2 (x, y)); putchar (V (x, y)); } for (x = 0; x < 512; ++x) { putchar (U (x, y)); putchar (Y2 (x, y)); putchar (V (x, y)); putchar (U (x, y)); putchar (Y (x, y)); putchar (V (x, y)); } } return 0; }