#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
long long t[MAXN], sum[MAXN];
int n;
int ans[MAXN];
int getpos(long long val) {
  int pos = lower_bound(t + 1, t + 1 + n, val) - t;
  return pos;
}
int main() {
  int cnt = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &t[i]);
  }
  for (int i = 1; i <= n; i++) {
    ans[i] = 20;
    int pos = getpos(t[i] - 89);
    long long co = sum[i - 1] - sum[pos - 1];
    if (co >= 50)
      ans[i] = 0;
    else if (50 - co < ans[i])
      ans[i] = 50 - co;
    pos = getpos(t[i] - 1439);
    co = sum[i - 1] - sum[pos - 1];
    if (co >= 120)
      ans[i] = 0;
    else if (120 - co < ans[i])
      ans[i] = 120 - co;
    sum[i] = sum[i - 1] + ans[i];
  }
  for (int i = 1; i <= n; i++) {
    printf("%d\n", ans[i]);
  }
  return 0;
}
