#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); ll N, A, a, b, x; string S, T; cin >> N >> S >> T; a = S.size(); b = T.size(); for (int i=0; i> A; for (int j=A/a; j>=0; j--){ x = A-a*j; if (x % b == 0){ x /= b; for (int k=0; k