#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int temp;
  while (b > 0) {
    temp = b;
    b = a % b;
    a = temp;
  }
  return a;
}
int main() {
  int N, sum50, sum1440, reqd, x, idx;
  scanf("%d", &N);
  vector<int> vec;
  vec.push_back(0);
  for (int i = 1; i <= N; i++) {
    scanf("%d", &x);
    vec.push_back(x);
  }
  int csum[N + 2];
  csum[0] = 0;
  for (int i = 1; i <= N; i++) {
    idx = lower_bound(vec.begin(), vec.end(), vec[i] - 90 + 1) - vec.begin();
    idx = max(idx, 1);
    sum50 = csum[i - 1] - csum[idx - 1];
    idx = lower_bound(vec.begin(), vec.end(), vec[i] - 1440 + 1) - vec.begin();
    idx = max(idx, 1);
    sum1440 = csum[i - 1] - csum[idx - 1];
    reqd = min(min(50 - sum50, 120 - sum1440), 20);
    printf("%d\n", reqd);
    csum[i] = csum[i - 1] + reqd;
  }
  return 0;
}
