#include <bits/stdc++.h>
using namespace std;
template <class T, class S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  return os << "(" << v.first << ", " << v.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (int i = int(0); i <= int((static_cast<int>((v).size())) - 1); ++i) {
    if (i) os << ", ";
    os << v[i];
  }
  return os << "]";
}
template <class T>
bool setmax(T& _a, T _b) {
  if (_a < _b) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
bool setmin(T& _a, T _b) {
  if (_b < _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
T gcd(T _a, T _b) {
  return _b == 0 ? _a : gcd(_b, _a % _b);
}
int main() {
  int n;
  scanf("%d", &n);
  vector<int> t(n);
  for (int i = int(0); i <= int((n)-1); ++i) scanf("%d", &t[i]);
  vector<long long> f(n + 1);
  f[0] = 0;
  int x = 0, y = 0;
  for (int i = int(0); i <= int((n)-1); ++i) {
    while (t[i] - t[x] >= 90) ++x;
    while (t[i] - t[y] >= 1440) ++y;
    f[i + 1] = f[i] + 20;
    if (x < i) setmin(f[i + 1], f[x] + 50);
    if (y < i) setmin(f[i + 1], f[y] + 120);
  }
  for (int i = int(0); i <= int((n)-1); ++i) printf("%lld\n", f[i + 1] - f[i]);
  return 0;
}
