from urllib import parse
import requests
import json

url = "http://127.0.0.1"
port = 7777
a = 2
b = 4
query_args = {'a': a, 'b': b}
encoded_args = parse.urlencode(query_args)
full_url = f"{url}:{port}?{encoded_args}"
response_json = requests.get(full_url).text
arr = json.loads(response_json)
arr.sort()
for i in arr:
    print(i)


@@ -51,57 +51,66 @@
 on%0A%0A
-url = %22http://127.0.0.1%22%0Aport = 7777%0Aa = 2%0Ab = 4%0A
+%0Adef handle_cgi_request(url, port, param_a, param_b):%0A    
 quer
@@ -128,16 +128,22 @@
 a': 
+param_
 a, 'b': 
 b%7D%0Ae
@@ -142,11 +142,21 @@
 b': 
-b%7D%0A
+param_b%7D%0A    
 enco
@@ -194,16 +194,20 @@
 y_args)%0A
+    
 full_url
@@ -240,16 +240,20 @@
 _args%7D%22%0A
+    
 response
@@ -288,16 +288,20 @@
 l).text%0A
+    
 arr = js
@@ -324,16 +324,20 @@
 e_json)%0A
+    
 arr.sort
@@ -339,16 +339,164 @@
 .sort()%0A
+    return arr%0A%0A%0Adef main():%0A    url = input()%0A    port = input()%0A    a = input()%0A    b = input()%0A    arr = handle_cgi_request(url, port, a, b)%0A    
 for i in
@@ -501,16 +501,20 @@
 in arr:%0A
+    
     prin
@@ -519,8 +519,47 @@
 int(i)%0A%0A
+%0Aif __name__ == %22__main__%22:%0A    main()%0A

use functions;