#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 100010;
int dp[N], v[N];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", v + i);
  }
  dp[0] = 20;
  for (int i = 1; i < n; i++) {
    dp[i] = 20 + dp[i - 1];
    auto it = upper_bound(v, v + n, v[i] - 90);
    if (it != v) {
      it--;
      dp[i] = min(dp[i], 50 + dp[it - v]);
    } else {
      dp[i] = min(dp[i], 50);
    }
    it = upper_bound(v, v + n, v[i] - 1440);
    if (it != v) {
      it--;
      dp[i] = min(dp[i], 120 + dp[it - v]);
    } else {
      dp[i] = min(dp[i], 120);
    }
  }
  printf("%d\n", dp[0]);
  for (int i = 1; i < n; i++) {
    printf("%d\n", dp[i] - dp[i - 1]);
  }
  return 0;
}
