class Module
  def memoize(name)
    original = "__original_#{name}__"
    ([Class, Module].include?(self.class) ? self : self.class).class_eval {
      alias_method(original, name)
      private(original)
      cache = {}
      define_method(name){ |*args|
        cache[args] ||= send(original, *args)
      }
    }
  end 
end

class Solve
  def calc(m, n, k)
    return [m, n] if k == $n
    calc(m * k + n, n * k, k + 1)
  end
  memoize :calc
end


while true
  $n, k, m, r = gets.split.map(&:to_i)
  break if $n == 0
  if m == 0 then x, y = 1, $n
  else
    s = Solve.new
    x, y = s.calc(1, 1, 1)
    y *= $n
    g = x.gcd y
    x /= g; y /= g
  end
  x, mod = x.divmod y
  print x, '.'
  x = mod * 10
  r.times.reduce(x){ |t, _| t, mod = t.divmod y; print t; mod * 10 }
  puts
end