#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
void swap(int *a, int *b) {
  int temp = *a;
  *a = *b;
  *b = temp;
}
unsigned long long int POW(unsigned long long int p, int b) {
  unsigned long long int ans = 1LL;
  while (b > 0) {
    if (b & 1) {
      ans = ans * 1LL * p;
    }
    b /= 2;
    p = p * 1LL * p;
  }
  return ans;
}
long long int power(long long int a, long long int b, long long int mod) {
  long long int x = 1;
  long long int y = a;
  while (b > 0) {
    if (b & 1) {
      x = x * y;
      x %= mod;
    }
    y = y * y;
    y %= mod;
    b /= 2;
  }
  return x;
}
long long int add(long long int a, long long int b, long long int m = MOD) {
  long long int x = a + b;
  while (x >= m) x -= m;
  while (x < 0) x += m;
  return x;
}
long long int sub(long long int a, long long int b, long long int m = MOD) {
  long long int x = a - b;
  while (x < 0) x += m;
  while (x >= m) x -= m;
  return x;
}
long long int mul(long long int a, long long int b, long long int m = MOD) {
  long long int x = a * 1ll * b;
  x %= m;
  if (x < 0) x += m;
  return x;
}
long long int LOG_BASE(long long int base, long long int value) {
  long long int bound = (long long int)(logl(value) / logl(base));
}
const int N = 1e5 + 2;
int data[N];
long long int dp[N];
int n;
long long int solve(long long int value) {
  int low = 0;
  int high = n;
  int ans = 0;
  while (low <= high) {
    int mid = (low + high) >> 1;
    if (data[mid] <= value) {
      ans = mid;
      low = mid + 1;
    } else {
      high = mid - 1;
    }
  }
  return dp[ans];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> data[i];
  dp[1] = 20;
  for (int i = 2; i <= n; i++) {
    long long int t1 = 20 + dp[i - 1];
    long long int t2 = 50 + solve(data[i] - 90);
    long long int t3 = 120 + solve(data[i] - 1440);
    dp[i] = min(t1, min(t2, t3));
  }
  long long int prev = 0;
  for (int i = 1; i <= n; i++) {
    dp[i] -= prev;
    prev += dp[i];
  }
  for (int i = 1; i <= n; i++) cout << dp[i] << endl;
}
