#include<iostream>
using namespace std;
unsigned int num(unsigned int x){
  int r=0;
  while(x!=0){
  x= x/10;
    r++;
  }
  return r;
}
int main(){
  unsigned int a[3],b[3];
  for(int i = 0 ;i<3;i++){
  cin>>a[i]>>b[i];
   a[i]+=b[i];
  }
  cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<endl;
  for(int i=0;i<3;i++){
   cout<<num(a[i])<<endl;
  }
  return 0;
}