#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:60000000")
using namespace std;
const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const long long inf64 = ((long long)1 << 62) - 1;
const long double pi = 3.1415926535897932384626433832795;
const string task = "";
template <class T>
T sqr(T x) {
  return x * x;
}
int n;
int a[100500];
int t[100500];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < (int)(n); i++) scanf("%d", &a[i + 1]);
  t[0] = 0;
  for (int i = 1; i <= n; i++) {
    t[i] = t[i - 1] + 20;
    int p = (lower_bound(a + 1, a + n + 1, a[i] - 90 + 1) - a);
    if (p < i) t[i] = min(t[i], t[p - 1] + 50);
    p = (lower_bound(a + 1, a + n + 1, a[i] - 1440 + 1) - a);
    if (p < i) t[i] = min(t[i], t[p - 1] + 120);
  }
  for (int i = 0; i < (int)(n); i++) printf("%d\n", t[i + 1] - t[i]);
  return 0;
}
