// Type your code here, or load an example.
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for (int i =(a);i<(b);++i)
//宏定义要多加括号
#define trav(a,x) for(auto& a:x)//用a遍历x
#define subnb true
#define Lnb true
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
class Solution {
public:
int countOperations(int num1,int num2){
int i = 0;
while(num1&&num2){
if(num1>=num2)
num1 -= num2;
else
num2 -= num1;
cout<<num1<<num2<<endl;
++i;
};
return i;
};
};
int main(){
ios ::sync_with_stdio(false);
cin.tie(NULL);
int num1=5,num2=4;
Solution sou;
return sou.countOperations(num1,num2);
}