#include<bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
typedef long long LL;
typedef pair<double,int> P;
const LL mod=1000000007;
const LL LINF=1LL<<62;
const int INF=1<<30;
int dx[]={0,0,1,1,1,-1,-1,-1};
int dy[]={1,-1,1,0,-1,1,0,-1};


 
int main(){
    LL n,k;
    while(cin >> n >> k){
        if(!n&&!k) break;
        LL t = 9, sum = 1, d = 0, c = 1;
        for (int i = 0; i < 10; i++) {
            if(sum + t * (i + 1) >= n){
                d = i + 1;
                break;
            }
            sum += t * (i + 1);
            t *= 10;
            c = c * 10;
        }
        LL l = 0, r = t + 1;
        while(r - l > 1){
            LL m = (r + l) / 2;
            if(sum + d * m <= n){
                l = m;
            }
            else{
                r = m;
            }
        }
        sum += d * l;
        LL p = c + l;
        string ans = "";
        for (int i = 0; i <= k; i++) {
            ans += to_string(p+i);
        }
        for (int i = n-sum; i < n-sum+k; i++) {
            cout << ans[i];
        }
        cout << endl;
    }
    return 0;
}

