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