var a: sync int;
var b = 0;

cobegin {
  {
    b = 1;
    while (a < 3) {
      b = 2;
    }
  }
  a = 1;
  a += 1;
  a += 1;
}

if (b==2) then {
  writeln ("b is good");
} else {
  writeln ("b is bad");
}

var a: sync int;
var b = 0;

cobegin {
  {
    b = 1;
    while (a < 3) {
      b = 2;
    }
  }
  {
    a = 1;
    a = 2;
    a = 3;
  }
}

if (b==2) then {
  writeln ("b is good");
} else {
  writeln ("b is bad: ", b);
}
