**M** items are to be delivered in a circle of size **N**. Find the position where the **M-th** item will be delivered if we start from a given position **K**. Note that items are distributed at adjacent positions starting from **K**.

**Input:**

The first line consists of an integer **T** i.e number of test cases. The first and last line of each test case contains three integers **N,M **and** K.**

**Output:**

Print the position where the Mth item will be delivered.

**Constraints: **

1<=T<=100

1<=n,m,k<=1000

**Example:
Input:**

2

5 2 1

5 8 2

**Output:**

2

4

Ibrahim Nash | 119 |

Ryan Yang | 87 |

Robin Kendrick | 83 |

aristotle | 79 |

bz24244 | 79 |

Lam Ngoc Pham | 476 |

All Is Well | 399 |

Prateek Gole | 385 |

Divvya Sinha | 374 |

Ibrahim Nash | 359 |

akhayrutdinov | 3873 |

sanjay05 | 3366 |

Michael Riegger | 2035 |

Jasleen Kaur 2 | 2012 |

Quandray | 1982 |