class myInteger {
  private int n;
  private boolean flag;
  private myInteger fizzbuzzgizz(int m, String mes) {
    if (this.n % m == 0) {
      this.flag = false;
      System.out.print(mes);
    }
    return this;
  }

  public myInteger(int n) { this.n = n; flag = true; }
  public myInteger fizz() { return this.fizzbuzzgizz(3, "Fizz"); }
  public myInteger buzz() { return this.fizzbuzzgizz(5, "Buzz"); }
  public myInteger gizz() { return this.fizzbuzzgizz(7, "Gizz"); }
  public void endl() {
    if (flag == true)
      System.out.println(this.n);
    else
      System.out.println();
  }
}

public class Main {
  public static void main(String[] args) {
    
    new myInteger(1).fizz().buzz().gizz().endl();
    new myInteger(3).fizz().buzz().gizz().endl();
    new myInteger(5).fizz().buzz().gizz().endl();
    new myInteger(7).fizz().buzz().gizz().endl();
    new myInteger(15).fizz().buzz().gizz().endl();
    new myInteger(21).fizz().buzz().gizz().endl();
    new myInteger(35).fizz().buzz().gizz().endl();
    new myInteger(105).fizz().buzz().gizz().endl();
    new myInteger(997).fizz().buzz().gizz().endl();
  }
}
/* end */
