#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 666;
const int INF = 1e9;
int n, t[maxn], d[maxn];
int main(void) {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &t[i]);
    d[i] = INF;
  }
  for (int i = 1; i <= n; ++i) {
    d[i] = min(d[i], d[i - 1] + 20);
    int id = lower_bound(t, t + n + 1, t[i] - 89) - t;
    d[i] = min(d[i], d[max(id - 1, 0)] + 50);
    id = lower_bound(t, t + n + 1, t[i] - 1439) - t;
    d[i] = min(d[i], d[max(id - 1, 0)] + 120);
    printf("%d\n", d[i] - d[i - 1]);
  }
}
