#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9 + 7;
const int maxn = (long long)4e5 + 7;
const int lmaxn = (int)1e6 + 7;
const long long linf = (long long)1e18 + 7;
long long gcd(long long a, long long b) {
  while (b) a %= b, swap(a, b);
  return a | b;
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
bool isprime(long long x) {
  long long q = 0;
  if (x == 1) return false;
  for (long long i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      return false;
    }
  }
  return true;
}
long long n, pos;
long long a[maxn], d[maxn];
int main() {
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  for (long long i = 1; i <= n; i++) {
    d[i] = d[i - 1] + 20;
    for (long long j = i - 1; j >= 1; j--) {
      if (a[i] - a[j] >= 1440) break;
      if (a[i] - a[j] < 90) d[i] = min(d[i], d[j - 1] + 50ll);
      if (a[i] - a[j] < 1440) d[i] = min(d[i], d[j - 1] + 120ll);
    }
    cout << d[i] - d[i - 1] << "\n";
  }
  return 0;
}
