


1. Text form of ‘IPAddress’ must be ‘a.b.c.d’
2. The values of a,b,c and d can vary from ‘0’ to ‘255’ and both ‘0’ and ‘255’ are inclusive.
The first line of input contains an integer ‘T’ denoting the number of test cases.
The next ‘T’ lines represent the ‘T’ test cases.
The first and only line of every test case contains a string ‘IPAddress’.
For each test case, print ‘True’ if the given text ‘IPAddress’ is valid ‘IPv4’ else print ‘False’.
You don’t have to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 10^4
1 <= length of given text <= 50
Time limit: 1 sec
Idea is that, check every chunk is valid or not and the number of chunks is 4.
If a given text ‘IPAddress’ has exactly three dots any every two continuous dots containing a number from ‘0’ to ‘255’ then ‘IPAddress’ is valid.