#include <bits/stdc++.h>
using namespace std;
 

void setIO(string name = "") {
    ios_base::sync_with_stdio(0);
    cin.tie(nullptr);
}

#define ll long long
#define pb() push_back()
#define neutral 0

// const int INF = 1e9+7;
// const double pi = 3.14159265358979323846; 

// long long gcd(long long a, long long b){
//     return b ? gcd(b, a%b) : a;
// }


// ll merge(ll x, ll y){
//     return x^y;
// }

// vector<ll> tree;
// vector<ll> a;
// void update(ll node, ll l, ll r, ll index, ll value){
//     if(l==r){tree[node]=value;return;}
//     int mid=(l+r)/2;
//     if(mid>=index)update(node*2, l, mid, index, value);
//     else update(node*2+1, mid+1, r, index, value);
//     tree[node] = merge(tree[node * 2], tree[node * 2 + 1]);
// }

// ll func(ll node, ll l, ll r, ll ql, ll qr){
//     if(l>=ql && r<=qr){
//         return tree[node];
//     }
//     if(ql>r || qr<l){
//         return neutral;
//     }
//     ll mid = (l+r)/2;
//     return merge(func(node*2, l, mid, ql, qr), func(node*2+1, mid+1, r, ql, qr));
// }

vector<string> v(12, "............");
vector<int> nums(10);

bool check(int i, int j){
    if(v[i][j]=='#'){
        if(v[i][j+1]=='#'){
            
        }
        else if(v[i+1][j]=='#'){
            // o'ngini tekshirib ketish kerak
        }
        else {nums[1]++;return true;}
    }
}

void solve() {
    for(int i=1; i<=10; i++){
        string s; cin>>s;
        s="."+s+".";
        v[i]=s;
    }

    for(int i=0;i<=11; i++){
        for(int j=0; j<12; j++){
            cout<<v[i][j];
            // if(check(i, j)){cout<<"NO";return;}
        }
        cout<<"\n";
    }


}
 
int main() {   
    auto start = chrono::high_resolution_clock::now();  
    setIO();  
    int testCases=1;
    // cin>>testCases;
    while(testCases--){
        solve();
    }
    #ifdef LOCAL
    cout<<"\n\n______________________________________\n";
    auto duration = chrono::duration_cast<chrono::microseconds>(chrono::high_resolution_clock::now() - start);
  
     cout << "time: " << (double)duration.count()/1000.0 << " milliseconds" << endl;
    #endif
    
}