#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int dp[maxn], trip[maxn], n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", trip + i + 1);
  dp[0] = 0;
  trip[0] = -1e9;
  for (int i = 1; i <= n; ++i) {
    dp[i] = dp[i - 1] + 20;
    int x = upper_bound(trip, trip + i, trip[i] - 90) - trip - 1;
    dp[i] = min(dp[i], dp[x] + 50);
    x = upper_bound(trip, trip + i, trip[i] - 1440) - trip - 1;
    dp[i] = min(dp[i], dp[x] + 120);
  }
  for (int i = 1; i <= n; ++i) {
    printf("%d\n", dp[i] - dp[i - 1]);
  }
  return 0;
}
