#!/usr/bin/php -q
<?php

  // Open the stdin
  $fp = fopen("php://stdin", "r");

  // Discard first lines
  for($i=0; $i<7; $i++) fgets($fp);

  // Print only the opcodes to stdout
  while (!feof($fp)) {
    $line = fgets($fp);
    /*$opcode = substr($line, 8, 8);
    $caratteri = strlen($opcode);
    if($caratteri != 0){
        echo $opcode."\n";
    }*/

    $opcode = substr($line, 6, 2);
    $opcode2 = substr($line, 9, 2);
    $caratteri = strlen($opcode);
    if($caratteri != 0){
        echo $opcode.$opcode2."\n";
        $opcode = substr($line, 12, 2);
        $opcode2 = substr($line, 15, 2);
        echo $opcode.$opcode2."\n";
    }
    else{
        for($i=0; $i<1; $i++) fgets($fp);
     } 
    }

  // Close the input file
  fclose($fp);

?>
     
