import java.io.*;
import java.util.Comparator;
import java.util.StringTokenizer;
import java.util.TreeSet;

public class painting_ak {

    final static double EPS = 1e-9;

    static class Segment {
        int left, right;
        long sum;
        int cnt;

        Segment(int left, int right, long sum, int cnt) {
            this.left = left;
            this.right = right;
            this.sum = sum;
            this.cnt = cnt;
        }

        double getColor() {
            return sum / (1.0 * cnt);
        }

        boolean intersects(Segment s) {
            if (left > s.left) {
                return s.intersects(this);
            }
            return s.left < right;
        }

        Segment merge(Segment s) {
            if (left > s.left) {
                return s.merge(this);
            }
            if (s.left >= right) {
                throw new AssertionError();
            }
            return new Segment(Math.min(left, s.left), Math.max(right, s.right), sum + s.sum, cnt + s.cnt);
        }

        static class ByLeft implements Comparator<Segment> {
            @Override
            public int compare(Segment s1, Segment s2) {
                return s1.left - s2.left;
            }
        }

        static class ByColor implements Comparator<Segment>{
            @Override
            public int compare(Segment s1, Segment s2) {
                double c1 = s1.getColor();
                double c2 = s2.getColor();
                if (Math.abs(c1 - c2) > EPS) {
                    return c1 < c2 ? -1 : 1;
                }
                return s1.left - s2.left;
            }
        }

        @Override
        public String toString() {
            return "Segment{" +
                    "left=" + left +
                    ", right=" + right +
                    ", sum=" + sum +
                    ", cnt=" + cnt +
                    '}';
        }
    }

    void solve() throws IOException {
        int n = in.nextInt();
        TreeSet<Segment> line = new TreeSet<Segment>(new Segment.ByLeft());
        TreeSet<Segment> colors = new TreeSet<Segment>(new Segment.ByColor());
        for (int i = 0; i < n; i++) {
            int left = in.nextInt();
            int right = in.nextInt();
            long w = in.nextInt();
            Segment newS = new Segment(left, right, w, 1);
            while (true) {
                Segment s = line.ceiling(newS);
                if (s == null)
                    break;
                if (s.intersects(newS)) {
                    colors.remove(s);
                    line.remove(s);
                    newS = newS.merge(s);
                } else {
                    break;
                }
            }
            while (true) {
                Segment s = line.floor(newS);
                if (s == null)
                    break;
                if (s.intersects(newS)) {
                    colors.remove(s);
                    line.remove(s);
                    newS = newS.merge(s);
                } else {
                    break;
                }
            }
            line.add(newS);
            colors.add(newS);
            out.println(colors.last().getColor());
        }
    }

    static MyScanner in;
    static PrintWriter out;

    public static void main(String[] args) throws IOException {
        in = new MyScanner(new FileReader("painting.in"));
        out= new PrintWriter("painting.out");
        new painting_ak().solve();
        out.close();
    }

    static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        MyScanner(Reader r) {
            br = new BufferedReader(r);
        }

        String nextToken() throws IOException {
            while (st == null || !st.hasMoreTokens()) {
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }

        int nextInt() throws IOException {
            return Integer.parseInt(nextToken());
        }
    }
}
