#include <bits/stdc++.h>
using namespace std;
int main() {
  int t[100001], sum[100001];
  int n, idx, tot, charge;
  scanf("%d", &n);
  t[0] = sum[0] = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", t + i);
    sum[i] = sum[i - 1] + 20;
    idx = upper_bound(t, t + i, t[i] - 90) - t;
    tot = sum[i - 1] - sum[idx - 1];
    charge = 50 - tot;
    sum[i] = min(sum[i], sum[i - 1] + charge);
    idx = upper_bound(t, t + i, t[i] - 1440) - t;
    tot = sum[i - 1] - sum[idx - 1];
    charge = 120 - tot;
    sum[i] = min(sum[i], sum[i - 1] + charge);
    printf("%d\n", sum[i] - sum[i - 1]);
  }
  return 0;
}
