#include <algorithm>
#include <fstream>
#include <iostream> 
using namespace std; 

int main() 
{ 
  ifstream fin; 
  fin.open("8Scores.txt"); 
  if (!fin.good()) throw "I/O error"; 
  
  // read and save the scores 
  const int SIZE = 8; 
  int score[SIZE]; 
  int i; 
  for (i = 0; i < SIZE; i++) 
  { 
    fin >> score[i]; 
    fin.ignore(1000, 10); 
  } // for 
  fin.close(); 
  
  sort(score, score + SIZE); 
  
  for (i = 0; i < SIZE; i++) 
    cout << score[i] << ' '; 
  cout << endl; 
} // main 
