#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
#define all(x) x.begin(),x.end()
#define rep(i,j,n) for (long long i = j; i < (long long)(n); i++)
#define _GLIBCXX_DEBUG
#define MOD 1000000007
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
//(a+b-1)/b

signed main(){
	string s; cin>>s;
	int n; cin>>n;
	string ans;
	rep(i,0,s.size()){
		if(i%n==0)ans.push_back(s[i]);
	}
	cout<<ans<<endl;
	return 0;
}
///بِسْمِ الّٰلهِ الرَّحْمٰنِ الرَحِيْمِ
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pi acos(-1.0)
int main()
{
     ios_base::sync_with_stdio(false);cin.tie(NULL);
     ll int i,n,t,j=0,p,x,a=0,b,l=0,r=0,y,k,c,sum=0,m,d;
     cin>>a>>b;
     l=max(a,b);
     r=min(a,b);
     p=16-(a+b);
     x=p/2;
     if(p%2==1){
        x++;
     }
     //cout<<x<<" "<<l-r<<endl;
     if((l-r)<=x){
        cout<<"Yay!"<<endl;
     }
     else{
        cout<<":("<<endl;

     }

     return EXIT_SUCCESS;
}

