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 <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <complex>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <iomanip>
#include <assert.h>
#include <array>
#include <cstdio>
#include <cstring>
#include <random>
#include <functional>
#include <numeric>
#include <bitset>
#include <fstream>
#include <tuple>

using namespace std;

#define REP(i,a,b) for(int i=a;i<(int)b;i++)
#define rep(i,n) REP(i,0,n)
#define all(c) (c).begin(), (c).end()
#define zero(a) memset(a, 0, sizeof a)
#define minus(a) memset(a, -1, sizeof a)
#define watch(a) { cout << #a << " = " << a << endl; }
template<class T1, class T2> inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); }
template<class T1, class T2> inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); }

typedef long long ll;
int const inf = 1<<29;

int N, M, L;

vector<tuple<int, int, int>> vs;

double P[111][111];
double T[111][111];

namespace math { namespace combination {

#define COMBINATION_MAX 200
using return_type = ll;

namespace memorized { namespace combination { enum { max_value = COMBINATION_MAX }; bool __computed = false; inline bool computed() {if(__computed) { return true; } else { __computed = true; return false; }} return_type dp[max_value][max_value];} }

return_type comb(int N, int K) {
  using memorized::combination::dp;
  if(memorized::combination::computed()) { return dp[N][K]; }

  rep(i, memorized::combination::max_value) {
    dp[i][0] = 1;
    REP(j, 1, i+1) {
      dp[i][j] = dp[i-1][j-1] + dp[i-1][j];
//      dp[i][j] %= MOD;
    }
  }
  return dp[N][K];
}}}

void solve() {
  rep(i, N) {
    rep(j, M+1) {
      P[i][j] = pow(get<0>(vs[i]) * 0.01, j) * pow((100-get<0>(vs[i])) * 0.01, M - j) * math::combination::comb(M, j);
      if(j) T[i][j] = T[i][j-1] + get<2>(vs[i]);
      else T[i][0] = 1.0 * L / get<1>(vs[i]);
    }
  }

  rep(i, N) {
    double res = 0;

    if(get<1>(vs[i]) == 0) {
      cout << "0\n";
      continue;
    }

    rep(j, M+1) {
      double losers_prob = 1.0;
      rep(k, N) {
        if(i == k) continue;
        double sum = 0.0;
        rep(l, M+1) {
          if(T[i][j] < T[k][l]) sum += P[k][l];
        }
        losers_prob *= sum;
      }
      res += losers_prob * P[i][j];
    }
    printf("%.10f\n", res);
  }
}

int main() {

  cin >> N >> M >> L;
  rep(i, N) {
    int p, t, v; cin >> p >> t >> v;
    vs.push_back(make_tuple(p, v, t));
  }

  N = vs.size();
  solve();
  
  return 0;
}