Problem: N people run a marathon. There are M resting places on the way. For each resting place, the i-th runner takes a break with probability P_i percent. When the i-th runner takes a break, he gets rest for T_i time.

The i-th runner runs at constant speed V_i, and the distance of the marathon is L.

You are requested to compute the probability for each runner to win the first place. If a runner arrives at the goal with another person at the same time, they are not considered to win the first place.



Input

A dataset is given in the following format:

N M L
P_1 T_1 V_1
P_2 T_2 V_2
...
P_N T_N V_N


The first line of a dataset contains three integers N (1 \leq N \leq 100), M (0 \leq M \leq 50) and L (1 \leq L \leq 100,000). N is the number of runners. M is the number of resting places. L is the distance of the marathon.

Each of the following N lines contains three integers P_i (0 \leq P_i \leq 100), T_i (0 \leq T_i \leq 100) and V_i (0 \leq V_i \leq 100) describing the i-th runner. P_i is the probability to take a break. T_i is the time of resting. V_i is the speed.

Output

For each runner, you should answer the probability of winning. The i-th line in the output should be the probability that the i-th runner wins the marathon. Each number in the output should not contain an error greater than 10^{-5}.

Examples

Input

2 2 50
30 50 1
30 50 2


Output

0.28770000
0.71230000


Input

2 1 100
100 100 10
0 100 1


Output

0.00000000
1.00000000


Input

3 1 100
50 1 1
50 1 1
50 1 1


Output

0.12500000
0.12500000
0.12500000


Input

2 2 50
30 0 1
30 50 2


Output

0.51000000
0.49000000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#define For(i, a, b) for(int (i)=(int)(a); (i)<(int)(b); ++(i))
#define rFor(i, a, b) for(int (i)=(int)(a)-1; (i)>=(int)(b); --(i))
#define rep(i, n) For((i), 0, (n))
#define rrep(i, n) rFor((i), (n), 0)
#define fi first
#define se second
using namespace std;
typedef long long lint;
typedef unsigned long long ulint;
typedef pair<int, int> pii;
typedef pair<lint, lint> pll;
template<class T> bool chmax(T &a, const T &b){if(a<b){a=b; return true;} return false;}
template<class T> bool chmin(T &a, const T &b){if(a>b){a=b; return true;} return false;}
template<class T> T div_floor(T a, T b){
    if(b < 0) a *= -1, b *= -1;
    return a>=0 ? a/b : (a+1)/b-1;
}
template<class T> T div_ceil(T a, T b){
    if(b < 0) a *= -1, b *= -1;
    return a>0 ? (a-1)/b+1 : a/b;
}

constexpr lint mod = 1000000007;
constexpr lint INF = mod * mod;
constexpr int MAX = 200010;

lint gcd(lint p, lint q){
    p = abs(p);
    q = abs(q);
    while(q){
        lint r = p % q;
        p = q;
        q = r;
    }
    return p;
}

typedef struct Fraction{
    lint n, d; // n / d

    Fraction(lint n_=0, lint d_=1): n(n_), d(d_){
        if(d == 0) n = (n < 0 ? -1 : 1);
        else{
            lint g = gcd(n, d);
            n /= g;
            d /= g;
        }
    }

    Fraction operator-() const{
        return Fraction(-n, d);
    }
    Fraction &operator+=(const Fraction &rhs){
        n = n * rhs.d + rhs.n * d;
        d = d * rhs.d;
        return *this = Fraction(n, d);
    }
    Fraction &operator-=(const Fraction &rhs){
        n = n * rhs.d - rhs.n * d;
        d = d * rhs.d;
        return *this = Fraction(n, d);
    }
    Fraction &operator*=(const Fraction &rhs){
        n = n * rhs.n;
        d = d * rhs.d;
        return *this = Fraction(n, d);
    }
    Fraction &operator/=(const Fraction &rhs){
        n = n * rhs.d;
        d = d * rhs.n;
        return *this = Fraction(n, d);
    }

    Fraction operator+(const Fraction &rhs) const{
        Fraction ret(*this);
        return ret += rhs;
    }
    Fraction operator-(const Fraction &rhs) const{
        Fraction ret(*this);
        return ret -= rhs;
    }
    Fraction operator*(const Fraction &rhs) const{
        Fraction ret(*this);
        return ret *= rhs;
    }
    Fraction operator/(const Fraction &rhs) const{
        Fraction ret(*this);
        return ret /= rhs;
    }

    bool operator==(const Fraction &rhs) const{
        return n == rhs.n && d == rhs.d;
    }
    bool operator!=(const Fraction &rhs) const{
        return !(*this == rhs);
    }

    bool operator<(const Fraction &rhs) const{
        return n * rhs.d < rhs.n * d;
    }
    bool operator>(const Fraction &rhs) const{
        return rhs < *this;
    }
    bool operator<=(const Fraction &rhs) const{
        return !(*this > rhs);
    }
    bool operator>=(const Fraction &rhs) const{
        return !(*this < rhs);
    }

}frac;

int main(){
    int n, m, L;
    scanf("%d%d%d", &n, &m, &L);

    double comb[m + 1][m + 1];
    rep(i, m + 1)rep(j, m + 1) comb[i][j] = 0;
    comb[0][0] = 1;
    rep(i, m)rep(j, i + 1){
        comb[i + 1][j] += comb[i][j];
        comb[i + 1][j + 1] += comb[i][j];
    }

    double prob[n][m + 1];
    Fraction time[n][m + 1];
    int p[n], t[n], v[n];
    rep(i, n){
        scanf("%d%d%d", &p[i], &t[i], &v[i]);
        rep(k, m + 1){
            time[i][k] = Fraction(L + k * t[i] * v[i], v[i]);
            prob[i][k] = comb[m][k] * pow((double)p[i] / 100, k) * pow(1 - (double)p[i] / 100, m - k);
        }
    }

    rep(i, n){
        double ans = 0;
        rep(k, m + 1){
            double tmp = prob[i][k];
            rep(j, n)if(i != j){
                double ttmp = 0;
                rep(l, m + 1){
                    if(time[i][k] < time[j][l]) ttmp += prob[j][l];
                }
                tmp *= ttmp;
            }
            ans += tmp;
        }
        printf("%.10lf\n", ans);
    }
}