#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:100000000")
using namespace std;
const int N = 100100;
int d[N], t[N];
int main() {
  int n, i, j, k;
  scanf("%d", &n);
  for (i = 0; i < n; scanf("%d", &t[i]), i++)
    ;
  j = 0;
  k = 0;
  for (i = 0; i < n; i++) {
    d[i + 1] = d[i] + 20;
    for (; t[i] - t[j] >= 90; j++)
      ;
    d[i + 1] = min(d[i + 1], d[j] + 50);
    for (; t[i] - t[k] >= 1440; k++)
      ;
    d[i + 1] = min(d[i + 1], d[k] + 120);
    printf("%d\n", d[i + 1] - d[i]);
  }
  return 0;
}
