# File test_comp.rb, line 1
def markovc(input)

  #Regel: I*->H*
  if not (input=~/I\*/)==nil
    markovc(input.sub!(/I\*/, 'H*'))
  end

  #Regel: IH->HH
  if not (input=~/IH/)==nil
    markovc(input.sub!(/IH/, 'HH'))
  end

  #Regel: HD->DEH
  if not (input=~/HD/)==nil
    markovc(input.sub!(/HD/, 'DEH'))
  end

  #Regel: ED->DE
  if not (input=~/ED/)==nil
    markovc(input.sub!(/ED/, 'DE'))
  end

  #Regel: D->
  if not (input=~/D/)==nil
    markovc(input.sub!(/D/, ''))
  end

  #Regel: *I->D*
  if not (input=~/\*I/)==nil
    markovc(input.sub!(/\*I/, 'D*'))
  end

  #Regel: H->
  if not (input=~/H/)==nil
    markovc(input.sub!(/H/, ''))
  end

  #Regel: *->
  if not (input=~/\*/)==nil
    markovc(input.sub!(/\*/, ''))
  end

  #Regel: E->I
  if not (input=~/E/)==nil
    markovc(input.sub!(/E/, 'I'))
  end

  return input
end