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