#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;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgaW50IG4gPSAxMDA7CgogICAgdmVjdG9yPGludD4gYWxsKG4pLCBkMyhuKSwgZDUobik7CgogICAgaW50IGkgPSAxOwogICAgZ2VuZXJhdGUoYWxsLmJlZ2luKCksIGFsbC5lbmQoKSwgWyZpXXsgcmV0dXJuIGkrKzsgfSk7CgogICAgY29weV9pZihhbGwuY2JlZ2luKCksIGFsbC5jZW5kKCksIGQzLmJlZ2luKCksIFtdKGludCB4KSB7IHJldHVybiB4ICUgMyA9PSAwOyB9KTsKICAgIGNvcHlfaWYoYWxsLmNiZWdpbigpLCBhbGwuY2VuZCgpLCBkNS5iZWdpbigpLCBbXShpbnQgeCkgeyByZXR1cm4geCAlIDUgPT0gMDsgfSk7CgogICAgZm9yIChpbnQgeCA6IGFsbCkgewogICAgICAgIGJvb2wgZmxhZyA9IHRydWU7CiAgICAgICAgaWYgKGZpbmQoZDMuY2JlZ2luKCksIGQzLmNlbmQoKSwgeCkgIT0gZDMuY2VuZCgpKSB7CiAgICAgICAgICAgIGNvdXQgPDwgIkZpenoiOwogICAgICAgICAgICBmbGFnID0gZmFsc2U7CiAgICAgICAgfQogICAgICAgIGlmIChmaW5kKGQ1LmNiZWdpbigpLCBkNS5jZW5kKCksIHgpICE9IGQ1LmNlbmQoKSkgewogICAgICAgICAgICBjb3V0IDw8ICJCdXp6IjsKICAgICAgICAgICAgZmxhZyA9IGZhbHNlOwogICAgICAgIH0KICAgICAgICBpZiAoZmxhZykgY291dCA8PCB4OwogICAgICAgIGNvdXQgPDwgIiAiOwogICAgfQoKICAgIHJldHVybiAwOwp9