#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
    int n = 100;

    vector<int> all(n), d3(n), d5(n);

    int i = 1;
    generate(all.begin(), all.end(), [&i]{ return i++; });

    copy_if(all.cbegin(), all.cend(), d3.begin(), [](int x) { return x % 3 == 0; });
    copy_if(all.cbegin(), all.cend(), d5.begin(), [](int x) { return x % 5 == 0; });

    for (int x : all) {
        bool flag = true;
        if (find(d3.cbegin(), d3.cend(), x) != d3.cend()) {
            cout << "Fizz";
            flag = false;
        }
        if (find(d5.cbegin(), d5.cend(), x) != d5.cend()) {
            cout << "Buzz";
            flag = false;
        }
        if (flag) cout << x;
        cout << " ";
    }

    return 0;
}