A girl on a beach with rainbow flags.
A girl with rainbow flags on a beach
With rainbow flags on a beach is a rephrase of on a beach with rainbow flags.
exists x1 x2 x3 x4.(a_topic(x1) & on(x1,x2) & with(x2,x3) & n_flag(x3) & of(x3,x4) & n_rainbow(x4) & n_beach(x2) & n_girl(x1))
exists x1 x2 x3 x4.(a_topic(x1) & with(x1,x2) & on(x2,x4) & n_beach(x4) & n_flag(x2) & of(x2,x3) & n_rainbow(x3) & n_girl(x1))