#include <bits/stdc++.h>
using namespace std;
const long long UNDEF = -1;
const long long INF = 1e18;
template <typename T>
inline bool chkmax(T& aa, T bb) {
  return aa < bb ? aa = bb, true : false;
}
template <typename T>
inline bool chkmin(T& aa, T bb) {
  return aa > bb ? aa = bb, true : false;
}
template <class T>
T extgcd(T a, T b, T& x, T& y) {
  for (T u = y = 1, v = x = 0; a;) {
    T q = b / a;
    swap(x -= q * u, u);
    swap(y -= q * v, v);
    swap(b -= q * a, a);
  }
  return b;
}
template <class T>
T mod_inv(T a, T m) {
  T x, y;
  extgcd(a, m, x, y);
  return (m + x % m) % m;
}
long long mod_pow(long long a, long long n, long long mod) {
  long long ret = 1;
  long long p = a % mod;
  while (n) {
    if (n & 1) ret = ret * p % mod;
    p = p * p % mod;
    n >>= 1;
  }
  return ret;
}
const long long mn = 1e5 + 4;
long long t[mn];
map<long long, long long, greater<long long> > h;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  scanf("%lld", &n);
  t[0] = -INF;
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &t[i]);
  }
  h[t[0]] = 0;
  long long prev = 0;
  for (long long i = 1; i <= n; i++) {
    long long ans = prev + 20;
    {
      auto it = h.lower_bound(t[i] - 90);
      if (it != h.end()) {
        long long cand = it->second + 50;
        chkmin(ans, cand);
      }
    }
    {
      auto it = h.lower_bound(t[i] - 1440);
      if (it != h.end()) {
        long long cand = it->second + 120;
        chkmin(ans, cand);
      }
    }
    h[t[i]] = ans;
    long long final = ans - prev;
    printf("%lld\n", final);
    prev = ans;
  }
}
