#include <iostream>
#include <string>
using namespace std;
char dec2hexChar(short int n) {
if (0 <= n && n <= 9) {
return char(short('0') + n);
}
else if (10 <= n && n <= 15) {
return char(short('A') + n - 10);
}
else {
return char(0);
}
}
short int hexChar2dec(char c) {
if ('0' <= c && c <= '9') {
return short(c - '0');
}
else if ('a' <= c && c <= 'f') {
return (short(c - 'a') + 10);
}
else if ('A' <= c && c <= 'F') {
return (short(c - 'A') + 10);
}
else {
return -1;
}
}
string escapeURL(const string& URL)
{
string result = "";
for (unsigned int i = 0; i < URL.length(); i++) {
char c = URL[i];
if (
('0' <= c && c <= '9') ||
(