.
package com.javarush.task.task15.task1527;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
/*
Парсер реквестов
*/
public class Solution {
public static void main(String[] args) throws IOException {
//add your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s = reader.readLine();
String b = s.substring(s.indexOf("?")+1);
String redex = "=|&";
String [] word = b.split(redex);
for (int i = 0; i < word.length-1; i++) {
if (!isDouble(word[i]) && !isInteger(word[i])) {
System.out.print(word[i] + " ");
}
}
System.out.println();
for (int i = 0; i < word.length; i++){
if(isDouble(word[i])){
alert(Double.parseDouble(word[i]));
}
}
}
public static boolean isDouble(String s){
if (!s.contains("."))
return false;
try {
Double d = Double.parseDouble(s);
return true;
} catch (NumberFormatException e){
return false;
}
}
public static boolean isInteger(String s){
try {
int d = Integer.parseInt(s);
return true;
} catch (NumberFormatException e){
return false;
}
}
public static void alert(double value) {
System.out.println("double: " + value);
}
public static void alert(String value) {
System.out.println("String: " + value);
}
}