#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
const int N = 100000 + 5;
int n, t[N];
int d[N];
void solve() {
  scanf("%d", &n);
  for (int i = 1; i <= (int)(n); ++i) scanf("%d", &t[i]);
  map<int, int> ma;
  for (int i = 1; i <= (int)(n); ++i) {
    ma[t[i]] = i;
    d[i] = 20 + d[i - 1];
    int x = t[i] - 90;
    map<int, int>::iterator it = ma.upper_bound(x);
    int j = it->second;
    d[i] = min(d[i], d[j - 1] + 50);
    x = t[i] - 1440;
    it = ma.upper_bound(x);
    j = it->second;
    d[i] = min(d[i], d[j - 1] + 120);
  }
  for (int i = 1; i <= (int)(n); ++i) {
    printf("%d\n", d[i] - d[i - 1]);
  }
}
long long rd() { return ((long long)rand() << 16) + rand(); }
void testgen() {
  FILE* f = fopen("input.txt", "w");
  fclose(f);
}
int main() {
  std::cout << std::fixed;
  std::cout.precision(8);
  std::cerr << std::fixed;
  std::cerr.precision(3);
  solve();
  return 0;
}
