#include <mpc.h>

#define N 5
int [net SimpleNet(n) w] MPC_Barrier( void ) {
  int [w:parent]bs[n], [w]b=1;
  bs[] = b;
  b = bs[];
}

int [*]main() {
  net SimpleNet(N) mynet;

  [mynet]: {
    int my_coordinate;
  
    my_coordinate = I coordof mynet;
    if(my_coordinate%2==0)
      MPC_Printf("Hello, even world!\n");

    ([(N)mynet])MPC_Barrier();

    if(my_coordinate%2==1)
      MPC_Printf("Hello, odd world!\n");
  }
}