#include <iostream>

using namespace std;

int main() {
    int n;
    cin >> n;
    int arr[n];
    for(int i = 0;i < n;i++)
    {
        cin >> arr[i];
    }
    cout << arr[0] << " ";
    cout << arr[n/2] << " ";
    cout << arr[n-1];
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: