#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  while(cin>>s){
    s+="*";
    string ans;
    char c[9][10]=
      {{'\'',',','.','!','?'},
       {'a','b','c','A','B','C',},
       {'d','e','f','D','E','F',},
       {'g','h','i','G','H','I',},
       {'j','k','l','J','K','L',},
       {'m','n','o','M','N','O',},
       {'p','q','r','s','P','Q','R','S',},
       {'t','u','v','T','U','V',},
       {'w','x','y','z','W','X','Y','Z',}};
    int si[]={5,6,6,6,6,6,8,6,8,};
    char a;
    int i,j,k;
    for(i=0;i<s.size();i++){
      a=s[i];k=0;
      if(s[i]=='*') break;
      while(s[i]==s[i+1]) {
	i++;k++;
      }
      if(a=='0'){
	for(j=0;j<k;j++) ans+=' ';
	continue;
      }
      ans+=c[a-'1'][k%s[a-'1']];
    }
    cout << ans << endl;
  }
  return 0;
}