#include #include #define chmin(x,y) (x) = min((x),(y)) #define chmax(x,y) (x) = max((x),(y)) #define ld long double using namespace std; using namespace atcoder; using ll = long long; const ll mod = 998244353; using mint = modint998244353; using Graph = vector>>; const vector dx = {1,0,-1,0}, dy = {0,1,0,-1}; int main(){ // input int N; cin >> N; vector A(N); for(int i = 0; i < N; i++) cin >> A[i]; // prep sort(A.begin(),A.end()); string S; for(int i = 0; i < N; i++) S += A[i]; // solve mint ans = 0; for(auto c : S){ int n = c - '0'; ans *= 10; ans += n; } // output cout << ans.val() << endl; }