[TASK]:
You will be given lines of pseudocode, your task is to write the corresponding C++ code. The pseudocode will provide detailed description of the c++ code line by line. The pseudocode is garanteed to be correct and complete.

[INSTRUCTION]:
The following libraries are already included in the code.
```cpp
#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <fstream>
#include <climits>
#include <cassert>
#include <iomanip>
#include <sstream>
#include <bitset>
using namespace std;
```
Do not include them in your code again. Please surround your code with ```cpp and ``` markers. Note that the code should correspond to the pseudocode line by line.

[PSEUDOCODE]:
define the main function
    set int n, sum to 0
    create an integer vector v
    set character mark to value of +
    if mark is not equal to = then do the following
        if mark is + then do
            set the push_back value of v to 1
            add one to sum
        end of the block
        if mark is - then do
            set the push_back value of v to -1
            minus 1 from sum
        end of the block
        take input mark
    end of the block
    read n
    for i = 0 to less than or equal to v.size() - 1 do the following
        if sum is greater than n then do
            if v[i] is less than 0 then do
                if sum - n is less than or equal to n - 1 then do
                    subtract sum - n from v[i]
                    set sum to n
                    break
                else
                    subtract n - 1 from v[i]
                    subtract n - 1 from sum
                end of the block
            end of the block
        else if the sum is less than n
            if v[i] is greater than 0 then do
                if n - sum is less than or equal to n - 1 then do
                    v[i] equals v[i] plus n - sum
                    set sum to n
                    break
                else
                    v[i] equals v[i] plus n - 1
                    sum equals sum plus n - 1
                end of the block
            end of the block
        else
            break
    end of the block
    if sum is n then do
        output Possible
        output v[0]
        for i = 1 to less than or equal to v.size() - 1 do the following
            if v[i] is greater than 0 then do
                output +
            else
                output -
            output the absolute value of v[i]
        end of the block
        output = n
    else
        output Impossible
    return to indicate successful execution
end of the block

[CODE]:

int main() {
    int n, sum = 0;
    vector<int> v;
    char mark = '+';
    while (mark != '=') {
        if (mark == '+') {
            v.push_back(1);
            sum++;
        }
        if (mark == '-') {
            v.push_back(-1);
            sum--;
        }
        cin >> mark;
    }
    cin >> n;
    for (int i = 0; i <= v.size() - 1; i++) {
        if (sum > n) {
            if (v[i] < 0) {
                if (sum - n <= n - 1) {
                    v[i] -= sum - n;
                    sum = n;
                    break;
                } else {
                    v[i] -= n - 1;
                    sum -= n - 1;
                }
            }
        } else if (sum < n) {
            if (v[i] > 0) {
                if (n - sum <= n - 1) {
                    v[i] += n - sum;
                    sum = n;
                    break;
                } else {
                    v[i] += n - 1;
                    sum += n - 1;
                }
            }
        } else
            break;
    }
    if (sum == n) {
        cout << "Possible" << endl;
        cout << v[0] << " ";
        for (int i = 1; i <= v.size() - 1; i++) {
            if (v[i] > 0)
                cout << "+ ";
            else
                cout << "- ";
            cout << abs(v[i]) << " ";
        }
        cout << "= " << n << endl;
    } else
        cout << "Impossible" << endl;
    return 0;
}