MINUTE = 60
HOUR   = MINUTE*60
DAY    = HOUR*24
WEEK   = DAY*7

def sec_to_str(sec)
  w, rem = sec.divmod(WEEK)
  d, rem = rem.divmod(DAY)
  h, rem = rem.divmod(HOUR)
  m, s   = rem.divmod(MINUTE)
  units  = [, , , , ]
  units.reject{|str| str.start_with?()}.join()
end

[7259, 86400, 6000000].each{|t| puts }