Dr .: Peter, I've finally done it.

Peter: See you again? What kind of silly invention is this time?

Dr .: I finally came up with a revolutionary way to process mathematical formulas on a computer. Look at this table.

Ordinary notation | Dr.'s "breakthrough" notation
--- | ---
1 + 2 | 1 2 +
3 * 4 + 7 | 3 4 * 7 +
10 / (2 --12) | 10 2 12-/
(3-4) * (7 + 2 * 3) | 3 4 --7 2 3 * + *



Peter: Yeah.

Dr .: Fufufu. This alone won't tell you what it means to an inexperienced person. It's important from here.

Peter: I mean ...

Dr .: You know that computers have a data structure called a stack. Look, that's "first in, then out".

Peter: Yes. I know, that ...

Dr .: This groundbreaking notation uses that stack. For example, this 10 2 12-/, but process as follows.

Processing target | 10 | 2 | 12 |-| /
--- | --- | --- | --- | --- | ---
| ↓ | ↓ | ↓ | ↓ 2-12 | ↓ 10 / -10
Stack | |.
---
..
Ten
| ..
---
2
Ten
| 12
---
2
Ten
| ..
---
-Ten
Ten
| ..
---
..
-1



Dr .: How is it? You don't have to worry about parentheses or operator precedence, right? The word order is also "10 divided by 2 minus 12", which is somewhat similar to his Far Eastern island nation, Japanese. With this epoch-making invention, our laboratory is safe. Fafafa.

Peter: I mean, Doctor. I learned this in the basic course at the University of Aizu when I was in Japan. Everyone had a simple program called "Reverse Polish Notation".

Dr .: ...

So, instead of Peter, I decided to teach this program to the doctor. Create a program that inputs the formula written in "Reverse Polish Notation" and outputs the calculation result.



input

Given multiple datasets. For each dataset, a formula in Reverse Polish Notation (a string of up to 80 characters with integers and arithmetic symbols separated by one blank character (half-width)) is given on one line. No formula is given that divides a value by 0 or a value that is as close to 0 as possible.

The number of datasets does not exceed 50.

output

Output the calculation result (real number) on one line for each data set. The calculation result may include an error of 0.00001 or less.

Example

Input

10 2 12 - /
3 4 - 7 2 3 * + *
-1 -2 3 + +


Output

-1.000000
-13.000000
0.000000

import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		Scanner stdIn = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		while(stdIn.hasNext()) {
			ArrayDeque<Double> stack = new ArrayDeque<Double>();  
			String[] tmp = stdIn.nextLine().split(" ");
			stack.push(Double.parseDouble(tmp[0]));
			for(int i = 1; i < tmp.length; i++) {
				if(tmp[i].equals("+")) {
					double o2 = stack.pop();
					double o1 = stack.pop();
					stack.push(o1 + o2);
				}
				else if(tmp[i].equals("-")) {
					double o2 = stack.pop();
					double o1 = stack.pop();
					stack.push(o1 - o2);
				}
				else if(tmp[i].equals("*")) {
					double o2 = stack.pop();
					double o1 = stack.pop();
					stack.push(o1 * o2);
				}
				else if(tmp[i].equals("/")){
					double o2 = stack.pop();
					double o1 = stack.pop();
					stack.push(o1 / o2);
				}
				else {
					stack.push(Double.parseDouble(tmp[i]));
				}
			}	
			double ans = stack.pop();
			System.out.println(ans);
		}
		out.flush();
			
	}
	
	static boolean isNum(String number) {
	    try {
	        Integer.parseInt(number);
	        return true;
	    } catch (NumberFormatException e) {
	        return false;
	    }
	} 
}
class LL {
	int size;
	Node now;
	LL(int n) {
		now = new Node(null,null,1);
		Node tmp = new Node(null,null,2);
		now.next = tmp;
		now.prev = tmp;
		tmp.next = now;
		tmp.prev = now;
		size = n;
		now = tmp;
		for(int i = 2; i < n; i++) {
			add(i+1);
		}
	}
	
	void add(int a) {
		Node tmp = new Node(null,null,a);
		tmp.next = now.next;
		tmp.prev = now;
		now.next.prev = tmp;
		now.next = tmp;
		now = tmp;
	}
	
	void remove() {
		now.prev.next = now.next;
		now.next.prev = now.prev;
		now = now.next;
		size--;
	}
}

class Node {
	Node next;
	Node prev;
	int id;
	Node(Node a, Node b, int c) {
		next = a;
		prev = b;
		id = c;
	}
}
//------------------------------//
//-----------//
class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}
    public boolean hasNext() { skipUnprintable(); return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    
    public int nextInt() {
    	return (int)nextLong();
    }
    

}