// 2009Í[næ\I C : Champernowne Constant

#include <iostream>
#include <string>
#include <sstream>

using namespace std;

// numÌãÊ©çposÔÚÌð\¦·é
int getNum(int num, int pos){
	ostringstream oss; oss << num;
	return oss.str()[pos]-'0';
}

int main(){
	int N, K;
	while(cin >> N >> K){
		if(!(N||K)) break;
		N--;
		long long mul = 9;
		int i=0;
		// mul : iÌÌÂ
		for(i=1; ;i++){
			if(N < i*mul) break;
			// iÌÌªð­
			N -= i*mul;
			mul *= 10;
		}
		long long cur = 1;
		// iÌÌ½ÔÚ©çoÍ·é©
		int pos = N/i;
		// ½ÚðoÍ·é©
		int div = N%i;
		int count = 0;
		// iÌÌ¤¿Å¬ÌàÌ
		for(int j=1;j<i;j++) cur *= 10;
		while(count<K){	
			cout << getNum(cur+pos, div);
			if(div == i-1) { div = 0; pos++; }
			else           { div++;          }
			// oÍ·éÌªÏíéê
			if(cur+pos == 10*cur){
				cur *= 10; pos = 0; i++;
			}
			count++;
		}
		cout << endl;
	}
}