#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 105;
int t[N], f[N];
void solve() {
  int n;
  scanf("%d", &n);
  f[0] = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &t[i]);
    f[i + 1] = f[i] + 20;
    f[i + 1] = min(f[i + 1], f[upper_bound(t, t + i, t[i] - 90) - t] + 50);
    f[i + 1] = min(f[i + 1], f[upper_bound(t, t + i, t[i] - 1440) - t] + 120);
  }
  for (int i = 0; i < n; ++i) printf("%d\n", f[i + 1] - f[i]);
}
int main() {
  int _ = 1;
  for (int i = 1; i <= _; ++i) solve();
}
