// Arup Guha
// 6/5/2023
// Solution to Kattis Problem Arrangement (upprodun)

using namespace std;
#include <iostream>

int main() {

    int nRows, total;

    cin >> nRows >> total;

    int minRow = total/nRows;
    int extra = total%nRows;

    // Printing larger rows.
    for (int i=0; i<extra; i++) {
        for (int j=0; j<minRow+1; j++) cout << "*";
        cout << endl;
    }

    // Print the regular rows.
    for (int i=0; i<nRows-extra; i++) {
        for (int j=0; j<minRow; j++) cout << "*";
        cout << endl;
    }

    return 0;
}
