@m = 10**9 + 7
@table = Array.new(6) { [] }

def f(nn, k)
  return 1 if k == 0

  @table[k][nn] ||= begin
    s = 0
    (1..nn).each do |dn|
      (1..dn).each do |i|
        s += f(nn - dn, k - 1) * ((dn - i + 2) >> 1)
        s %= @m
      end
    end
    s
  end
end

gets.to_i.times do
  puts f(gets.to_i, 5)
end
