#include <bits/stdc++.h>
using namespace std;
const int inf = 1.01e9;
const double eps = 1e-9;
const int N = 1e5 + 10;
int t[N];
int mem[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; (i) < (n); ++i) scanf("%d", &t[i]);
  int s = 0;
  for (int i = 0; (i) < (n); ++i) {
    int v = s + 20;
    if (i) {
      int l = lower_bound(t, t + i, t[i] - 90 + 1) - t;
      v = min(v, mem[l] + 50);
    }
    if (i) {
      int l = lower_bound(t, t + i, t[i] - 1440 + 1) - t;
      v = min(v, mem[l] + 120);
    }
    mem[i + 1] = v;
    printf("%d\n", v - s);
    s = v;
  }
  return 0;
}
