#include <iostream>
using namespace std;
void f(string &s)
{
    int n = 0;
    for(auto i = s.begin(); i != s.end() - 1; ++i)
    {
        if(*i == '.' && *(i + 1) == '.')
             ++n;
    }
    cout << n << endl;
}
int main()
{
    int n , m ;
    int x;
    char c;
    while(cin >> n >> m)
    {
        string s;
        for(int i = 0; i < n; ++i)
        {
            cin >> c;
            s.push_back(c);
        }
        for(int i = 0; i < m; ++i)
        {
            cin >> x >> c;
            s[x - 1] = c;
            cout << s << endl;
            f(s);
        }
    }
    return 0;
}
有问题的话相互探讨。0-0