#include <bits/stdc++.h>
using namespace std;
int a[(int)2e5];
int d[(int)2e5];
int main() {
  int n, x;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    if (i == 1) {
      d[i] = 20;
      printf("20\n");
      continue;
    }
    d[i] = d[i - 1] + 20;
    x = upper_bound(a + 1, a + i, a[i] - 90) - a - 1;
    if (x < i - 1) d[i] = min(d[i], d[x] + 50);
    x = upper_bound(a + 1, a + i, a[i] - 1440) - a - 1;
    if (x < i - 1) d[i] = min(d[i], d[x] + 120);
    printf("%d\n", d[i] - d[i - 1]);
  }
  return 0;
}
