import std.stdio, std.string, std.conv, std.algorithm, std.numeric; import std.range, std.array, std.math, std.typecons, std.container, core.bitop; void main() { char[] n; scan(n); n.reverse(); int k = n.length.to!int; int m3, m5; foreach (i ; 0 .. k) { (m3 += n[i] - '0') %= 3; (m5 += (n[i] - '0') * (i & 1 ? 1 : 4)) %= 5; } if (!m3 & !m5) { writeln("FizzBuzz"); } else if (!m3) { writeln("Fizz"); } else if (!m5) { writeln("Buzz"); } else { writeln(n.retro()); } } struct Stack(T) { private: int N, peek; T[] data; public: this(int size) { N = size; data = new T[](N); } bool empty() @property { return peek == 0; } bool full() @property { return peek == N; } void push(T x) @property { assert(!full); data[peek++] = x; } void pop() @property { assert(!empty); --peek; } T top() @property { return data[peek - 1]; } void clear() @property { peek = 0; } int length() @property { return peek; } } void scan(T...)(ref T args) { string[] line = readln.split; foreach (ref arg; args) { arg = line.front.to!(typeof(arg)); line.popFront(); } assert(line.empty); } void fillAll(R, T)(ref R arr, T value) { static if (is(typeof(arr[] = value))) { arr[] = value; } else { foreach (ref e; arr) { fillAll(e, value); } } }