#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <cmath>
#include <cstdlib>
#include <stack>
#include <queue>
#include <numeric>
#include <ctime>
using namespace std;

typedef long long ll;

vector<ll> v;

ll pow10_(ll x){
	ll res = 1;
	for(ll i = 0; i < x; i++){
		res *= 10;
	}
	
	return res;
}

string i_to_s(ll n){
	string s;
	
	do{
		s.push_back( (n % 10) + '0' );
		n /= 10;
	}while(n != 0);
	
	reverse(s.begin(), s.end());
	
	return s;
}

ll search(ll k, ll d, ll &x){
	ll low = 0, high = 1e+18;
	while(high - low > 1){
		ll mid = (low + high) / 2;
		ll n = (d + 1) * mid;
		
		if(n < k){
			low = mid;
		}else{
			high = mid;
		}
	}
	
	ll a = (d + 1) * low;
	ll b = (d + 1) * high;
	
	if(b <= k){
		x = high;
		return b;
	}
	x = low;
	return a;
}

char solve(ll pos){	
	for(int i = 0; i < v.size(); i++){
		if(0 <= pos - v[i]){
			pos -= v[i];
		}else{
			ll x;
			ll n = search(pos, i, x);
			pos -= n;
			x = x + pow10_(i);
			string s = i_to_s(x);
			
			for(int j = 0; j < s.size(); j++){
				if(pos == 0){
					return s[j];
				}
				
				pos--;
			}
		}
	}
	
	return 0;
}
 
int main(){
	
	for(ll i = 1, n = 9; i <= 19; i++, n*= 10){
		v.push_back(n * i);
	}
	
	ll N, K;
	
	while(cin >> N >> K, N || K){
		for(int i = N - 1; i < N + K - 1; i++){
			cout << solve(i);
		}
		cout << endl;
	}
}