pinyin = {
  '' => 'ji',
  '' => 'y',
  '' => 'bng',
  '' => 'dng',
  '' => 'w',
  '' => 'j',
  '' => 'gng',
  '' => 'xn',
  '' => 'rn',
  '' => 'gi',

  '' => 'z',
  '' => 'chu',
  '' => 'yn',
  '' => 'mo',
  '' => 'chn',
  '' => 's',
  '' => 'w',
  '' => 'wi',
  '' => 'shn',
  '' => 'yu',
  '' => 'x',
  '' => 'hi'
}
celestial     = %w(         )
terrestrial   = %w(           )
animals       = %w(Rat   Ox   Tiger  Rabbit  Dragon Snake
                   Horse Goat Monkey Rooster Dog    Pig)
elements      = %w(Wood Fire Earth Metal Water)
aspects       = %w(yang yin)

BASE = 4

args = if!ARGV.empty?
         ARGV
       else
         [Time.new.year]
       end

args.each do |arg|
  ce_year = Integer(arg)
  print  if ARGV.length > 1
  cycle_year     = ce_year - BASE

  stem_number    = cycle_year % 10
  stem_han       = celestial[stem_number]
  stem_pinyin    = pinyin[stem_han]

  element_number = stem_number / 2
  element        = elements[element_number]

  branch_number  = cycle_year % 12
  branch_han     = terrestrial[branch_number]
  branch_pinyin  = pinyin[branch_han]
  animal         = animals[branch_number]

  aspect_number = cycle_year % 2
  aspect        = aspects[aspect_number]

  index         = cycle_year % 60 + 1

  print stem_han, branch_han
  puts 
end