import java.io.*;
import java.util.*;

public class painting_bm {
	FastScanner in;
	PrintWriter out;

	class Segment implements Comparable<Segment>{
		int x1, x2;
		int size;
		double color;
		
		Segment (int x1, int x2, int color) {
			this.x1 = x1;
			this.x2 = x2;
			this.color = color;
			this.size = 1;
		}
		
		@Override
		public int compareTo(Segment arg0) {
			return Integer.compare(x1, arg0.x1);
		}
		
	}
	
	TreeSet<Segment> ts;
	PriorityQueue<Double> colors;
	
	void solve() {
		int n = in.nextInt();
		ts = new TreeSet<Segment>();
		colors = new PriorityQueue<Double>();
		for (int i = 0; i < n; i++) {
			Segment newSegment = new Segment(in.nextInt(), in.nextInt(), in.nextInt());
			Segment x = ts.floor(newSegment);
			if (x != null && x.x2 > newSegment.x1) {
				newSegment.color = (x.color * x.size + newSegment.color * newSegment.size) / (newSegment.size + x.size + 0.);
				newSegment.size += x.size;
				newSegment.x1 = Math.min(newSegment.x1, x.x1);
				newSegment.x2 = Math.max(newSegment.x2, x.x2);
				colors.remove(-x.color);
				ts.remove(x);
			}
			while (true) {
				x = ts.higher(newSegment);
				if (x != null && x.x1 < newSegment.x2) {
					newSegment.color = (x.color * x.size + newSegment.color
							* newSegment.size)
							/ (newSegment.size + x.size + 0.);
					newSegment.size += x.size;
					newSegment.x1 = Math.min(newSegment.x1, x.x1);
					newSegment.x2 = Math.max(newSegment.x2, x.x2);
					colors.remove(-x.color);
					ts.remove(x);
				} else {
					break;
				}
			}
			ts.add(newSegment);
			colors.add(-newSegment.color);
			out.println(-colors.peek());
		}
	}

	void run() {
		try {
			in = new FastScanner(new File("painting.in"));
			out = new PrintWriter(new File("painting.out"));

			solve();

			out.close();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
	}

	void runIO() {

		in = new FastScanner(System.in);
		out = new PrintWriter(System.out);

		solve();

		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return null;
				st = new StringTokenizer(s);
			}
			return st.nextToken();
		}

		boolean hasMoreTokens() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return false;
				st = new StringTokenizer(s);
			}
			return true;
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}
	}

	public static void main(String[] args) {
		new painting_bm().run();
	}
}