#include <stdio.h>
#include <iostream>
#include <string>
#include <string.h>
using namespace std;
class fileop{
public:
void filewrite(char *a,const char *path);
~fileop();
void fileread(char *path);
private:
FILE * fp;
char buf[100];
};
void fileop::fileread(char *path){
if (fp = fopen(path,"r")){
while(!feof(fp)){
fgets(buf,sizeof(buf),fp);
int i;
for (i = 0; i < 100 && buf[i]!= '\0'; i++){
printf("%c",buf[i]);
}
// printf("\r\n");
}
}
else{
perror("open failed");
}
}
fileop::~fileop(){fclose(fp);}
void fileop::filewrite(char *a,const char *path){
if (fp = fopen(path,"a+")){
fprintf(fp,"\n%s\n",a);
// fclose(fp);
}
else{
perror("open error");
}
}
int main(){
char b[100];
scanf("%s",b);
fileop ca;
// ca.filewrite(b,"test");
ca.fileread("test");
return 0;
}