#include <bits/stdc++.h>
using namespace std;
double safe_sqrt(double x) { return sqrt(max((double)0.0, x)); }
long long GI(long long& x) { return scanf("%lld", &x); }
const long long MN = 100111;
long long t[MN], f[MN];
long long n;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << (fixed) << setprecision(9);
  while (GI(n) == 1) {
    for (long long i = (1), _b = (n); i <= _b; ++i) GI(t[i]);
    t[0] = -1000111;
    for (long long i = (1), _b = (n); i <= _b; ++i) {
      f[i] = f[i - 1] + 20;
      long long j = lower_bound(t, t + i, t[i] - 89) - t;
      f[i] = min(f[i], f[j - 1] + 50);
      j = lower_bound(t, t + i, t[i] - 1440 + 1) - t;
      f[i] = min(f[i], f[j - 1] + 120);
    }
    for (long long i = (1), _b = (n); i <= _b; ++i)
      printf("%lld\n", f[i] - f[i - 1]);
  }
}
