#include <bits/stdc++.h>
using namespace std;
int ara[100005];
int dp[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ara[i]);
  }
  for (int i = 1; i <= n; i++) {
    dp[i] = dp[i - 1] + 20;
    int p = lower_bound(ara, ara + n + 1, ara[i] - 89) - ara;
    if (p < i) dp[i] = min(dp[i], dp[p - 1] + 50);
    p = lower_bound(ara, ara + n + 1, ara[i] - 1439) - ara;
    if (p < i) dp[i] = min(dp[i], dp[p - 1] + 120);
    printf("%d\n", dp[i] - dp[i - 1]);
  }
}
