**Compilation/Execution Result:**

Given an array C[] of integers, find out the maximum difference between any two elements such that larger element appears after the smaller number in C[].

Examples: If array is [2, 3, 10, 6, 4, 8, 1] then returned value should be 8 (Diff between 10 and 2). If array is [ 7, 9, 5, 6, 3, 2 ] then returned value should be 2 (Diff between 7 and 9).

**Input:**

The first line of input contains an integer T denoting the number of test cases.

The first line of each test case is N,N is the size of array.

The second line of each test case contains N input C[i].

**Output:**

Print the maximum difference between two element. Otherwise print -1

**Constraints:**

1 ≤ T ≤ 80

2 ≤ N ≤ 100

1 ≤ C[i] ≤ 500

**Example:**

**Input:**

2

7

2 3 10 6 4 8 1

5

1 2 90 10 110

**Output:**

8

109

Rajat Thakur 2 | 168 |

surbhi_7 | 164 |

Ibrahim Nash | 132 |

aksh1996aksh | 129 |

D3rek | 128 |

Ibrahim Nash | 646 |

ashrepos | 546 |

RealHorror | 395 |

shi143din | 393 |

shaktiman_shaktiman_shaktiman | 363 |

akhayrutdinov | 4055 |

sanjay05 | 3425 |

Quandray | 2452 |

Michael Riegger | 2230 |

Jasleen Kaur 2 | 2012 |