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