open(VAR,"<var.dat"); # tut mistytya's'a nazvy zinnyh dl'a zaminy
open(IN,"<net.c");    # nazva faylu dla zminy zminyh


while(<VAR>)
{
  chomp;
  push(@vars,$_);
}

@forbid = qw(char unsigned int float main void if else while do for return short bool long define typedef struct n d f ld break continue scanf printf memset putchar sizeof abs true false strlen strcpy gets hd c sprintf short u stdin NULL fclose);
foreach (@forbid)
{ $words{$_} = $_};

while(<IN>)
{
  chomp;

  (@neww) =(m/\b(\w[A-Za-z_]+|[A-Za-z_]+)\b/g);
  if (!m/#include/)
  {
  foreach $s (@neww)
  {
    if (!exists($words{$s}))
    {
      $temp = int(rand($#vars));
      $words{$s} = $vars[$temp];
      @vars = @vars[0..$temp-1,$temp+1..$#vars];
    }
  }
  s/\b(\w[A-Za-z_]+|[A-Za-z_]+)\b/$words{$1}/g;
  }
  print $_."\n";
}