#include <bits/stdc++.h>
using namespace std;
int n, tot, h1 = 1, h2 = 1, a[100005], f[100005], sum[100005];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  f[1] = tot = 20;
  puts("20");
  for (int i = 2; i <= n; i++) {
    while (a[i] - a[h1] >= 90) h1++;
    while (a[i] - a[h2] >= 1440) h2++;
    int ans = 20;
    if (f[h1 - 1] + 50 - f[i - 1] < ans) {
      ans = f[h1 - 1] + 50 - f[i - 1];
    }
    if (f[h2 - 1] + 120 - f[i - 1] < ans) {
      ans = f[h2 - 1] + 120 - f[i - 1];
    }
    f[i] = f[i - 1] + ans;
    printf("%d\n", ans);
  }
  return 0;
}
