#include <bits/stdc++.h>
using namespace std;
template <class C>
void mini(C &a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C &a4, C b4) {
  a4 = max(a4, b4);
}
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
const long long MAX = 1e5 + 100;
long long t[MAX];
long long res[MAX];
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  if (0) cout << fixed << setprecision(6);
  long long n;
  cin >> n;
  for (long long i = (0); i <= ((long long)(n)-1); i++) {
    cin >> t[i];
    res[i + 1] = res[i] + 20;
    auto szu = [&](long long x) {
      x++;
      long long po = -1;
      long long ko = i;
      while (po + 1 != ko) {
        long long m = (po + ko) / 2;
        if (t[m] < x)
          po = m;
        else
          ko = m;
      }
      return res[ko];
    };
    mini(res[i + 1], szu(t[i] - 90) + 50);
    mini(res[i + 1], szu(t[i] - 1440) + 120);
    cout << res[i + 1] - res[i] << "\n";
  }
}
