Solution to FizzBuzz problem