If you have trouble finding it, under the "Keep It Organized" section is this rule:
Do provide evidence of having done some work yourself if posting questions from school or work assignments.
Your post above displays no evidence that you have tried to do any of your homework. The community here will not do your homework for you, or spoon-feed you code. We will only help you when you get stuck with something specific.
Start writing your program. If you hit upon any problems that you cannot solve, post the code that you have so far and describe the problems/errors you are experiencing and someone here will help you!
Remember: The amount of effort that you put into your posts will determine the amount of effort that others will put in to help you!
consider iterating through the string for the various substrings, working from biggest substring to smallest, doing it in this order you find the biggest one first and then you have found it. With each substring, reverse it and compare. if the string is 8 characters long, flip it check it, if it fails, reduce it to 7, get the substring at (0,7) flip it, check it, if it fails try the substring at (1,7) if it fails then try 6, which will require checks of (0,6),(1,6),(2,6) etc on down.
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...