#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
using namespace std;
 
typedef long long ll;

// v[i] := テヲツ。ツ?ヲツ閉ーテ」ツ??i+1)テ」ツ?ョテ・ツ按療」ツ?ョテ・ツ青暗ィツィツ暗ヲツ鳴?・ツュツ療ヲツ閉ー.
vector<ll> v;

// 10^x テ」ツつ津ィツソツ氾」ツ??
ll pow10_(ll x){
	ll res = 1;
	for(ll i = 0 ; i < x ; i++ ) res *= 10;
	return res;
}

// long long => string テ」ツ?ョテ・ツ、ツ嘉ヲツ渉?
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;
}

// k テ」ツつ津ィツカツ?」ツ?暗」ツ?ェテ」ツ??ヲツ慊?・ツ、ツァテ」ツ?ョ (d+1) * x テ」ツつ津ヲツアツづ」ツつ?」ツつ?
ll search(ll k, ll d, ll &x){
	ll low = 0, high = 1e+18;
	while( 1 < high - low ){
		ll mid = (low + high) / 2;
		ll n = (d + 1) * mid;
		
		if( n < k ){
			low = mid;
		}else{
			high = mid;
		}
	}
	
	ll a = (d + 1) * low, b = (d + 1) * high;
	if( b <= k ){
		x = high;
		return b;
	}
	x = low;
	return a;
}

// テ、ツスツ催ァツスツョ pos テ」ツ?ョテヲツ鳴?・ツュツ療」ツつ津ィツソツ氾」ツ??
char solve(ll pos){ 
	for(int i = 0 ; i < v.size() ; i++ ){
		if( 0 <= pos - v[i] ){ // テヲツャツ。テ」ツ?ョテヲツ。ツ?ヲツ閉ーテ」ツ?ォテ」ツ?凖」ツつ?
			pos -= v[i];
		}else{ // テヲツ。ツ?ヲツ閉ーテ」ツ??i+1)テ」ツ?ョテ」ツ?ゥテ」ツ?禿」ツ?凝」ツつ恥osテ」ツ?古ヲツ個?」ツ?療」ツ?ヲテ」ツ??」ツつ?
			ll x;
			pos -= search(pos, i, x);
			x = x + pow10_(i);
			string s = i_to_s(x);
			// s(i+1テヲツ。ツ?」ツ?ョテヲツ閉ーテ・ツュツ? テ」ツ?ョテ」ツ?ゥテ」ツ?禿」ツ?凝」ツつ?pos テ」ツ?古ヲツ個?」ツ?療」ツ?ヲテ」ツ??」ツつ?
			for(int j = 0 ; j < s.size() ; j++ ){
				if( pos == 0 ){
					return s[j];
				}
				pos--;
			}
		}
	}
	return 0;
}

int main(){
	// テ・ツ青?ヲツ。ツ?ヲツ閉ー i テ」ツ?ォテ」ツ?、テ」ツ??」ツ?ヲテ・ツ青暗ィツィツ暗」ツ?ョテヲツ鳴?・ツュツ療ヲツ閉ーテ」ツつ津ヲツアツづ」ツつ?」ツ?ヲテ」ツ?甘」ツ??
	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 ){
		// テ、ツスツ催ァツスツョ (N-1) テ」ツ?凝」ツつ?K テヲツ鳴?・ツュツ療・ツ?コテ・ツ環崚」ツ?凖」ツつ?
		for(int i = N - 1 ; i < N + K - 1 ; i++ ){
			cout << solve(i);
		}
		cout << endl;
	}
}