#include #include #include #include #include using namespace std; const int N = 1000500; long long xu[N]; int cc; long long getint() { long long res=0; char ch=getchar(); while((ch<'0' || ch>'9') && ch!='-') ch=getchar(); bool fan=0; if(ch=='-') { fan=1; ch=getchar(); } while('0'<=ch && ch<='9') { res=res*10+ch-'0'; ch=getchar(); } if(fan) res=-res; return res; } void Dfs(int x,long long now,int delta) { if(!delta) xu[++cc]=now; if(x<18) { Dfs(x+1,now*10+4,delta-1); Dfs(x+1,now*10+7,delta+1); } } void Init() { Dfs(0,0,0); sort(xu+1,xu+cc+1); } void f() { long long now=getint(); int l=2,r=cc+1; while(lcc) { int i; for(i=1;i<=10;i++) putchar('4'); for(i=1;i<=10;i++) putchar('7'); putchar('\n'); } else { cout<