#include <iostream>

using namespace std;

int main(void) {
	FILE * in = fopen("in.bin", "rb");
	
	if (in != NULL) {
		FILE * out = fopen("out.bin", "wb");
		
		if (out != NULL) {
			int num;
			
			while (fread(&num, sizeof(char), 1, in) == 1) {
				fwrite(&num, sizeof(char), 1, out);
				cout << num << " ";
			}
						
			fclose(out);
		} else {
			perror("Error (destination)");
		}
		
		fclose(in);
	} else {
		perror("Error (surce)");
	}
	
	return 0;
}