#include <cstdio>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <memory.h>
#include <sstream>
#include <ctime>
#include <bitset>
#include <random>
using namespace std;

#pragma comment(linker, "/stack:640000000")

typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;

typedef vector<int> vi;
typedef vector<pair<int, int > > vii;
typedef vector<ll> vll;
typedef vector<string> vs;
typedef vector<ld> vld;

typedef vector<vi> vvi;
typedef vector<vii> vvii;
typedef vector<vll> vvll;
typedef vector<vs> vvs;

typedef map<int, int> mpii;
typedef map<int, string> mpis;
typedef map<string, int> mpsi;
typedef map<string, string> mpss;

#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define sz(a) (int)((a).size())
#define len(a) (int)((a).length())

#define forr(i,n) for (int i = 0; i < (n); ++i)
#define fori(n) forr(i,n)
#define forj(n) forr(j,n)
#define fork(n) forr(k,n)
#define forin fori(n)
#define forjn forj(n)
#define forjm forj(m)
#define forkm fork(m)
#define foria(a) fori(sz(a))
#define foriv foria(v)
#define foris fori(len(s))
#define forja(a) forj(sz(a))
#define forjv forj(v)
#define forjs forj(len(s))

#define read cin>>
#define write cout<<
#define writeln write endl

#define readt int aaa; read aaa;
#define gett (bbb+1)
#define fort forr(bbb,aaa)


ld dis(ld x, ld y) { return sqrt(x*x + y*y); }
const ld PI = acos(ld(0.0)) * 2;

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

int nxt(int i, int n)
{
	return (i + 1) % n;
}

inline int vtx(int i, int switched)
{
	return i * 2 + 1 + switched;
}

vector<pair<int, ll>> graph[10000];

int main()
{
	ios::sync_with_stdio(false);

#ifdef _MSC_VER
	ifstream cin("input.txt");
	ofstream cout("output.txt");
#else
#endif

	cout.setf(ios::fixed);
	cout.precision(20);

	int n, b, a, c;
	read n >> a >> b >> c;

	vector<vi> contains(n, vi(256, 0));
	forin
	{
		string s;
		read s;
		forjs contains[i][s[j]] = 1;
	}


	const ll inf = 1000000000000000000LL;

	string s;
	read s;


	vll dp(n, inf);
	dp[0] = 0;

	forj(len(s))
	{
		vll d(2 * n + 1, inf);
		d[0] = 0;

		graph[0].clear();
		graph[0].reserve(10000);
		forin
		{
			graph[vtx(i, 0)].clear();
			graph[vtx(i, 0)].reserve(10);
			graph[vtx(i, 1)].clear();
			graph[vtx(i, 1)].reserve(10);
		}

		forin
		{
			graph[0].push_back(std::make_pair(vtx(i, 0), dp[i]));
			graph[vtx(i, 0)].push_back(std::make_pair(vtx(nxt(i, n), 1), a ));
			graph[vtx(i, 1)].push_back(std::make_pair(vtx(nxt(i, n), 1), b ));
		}

		set<pair<ll, int>> q;
		q.insert(std::make_pair(0, 0));
		while (!q.empty())
		{
			int from = q.begin()->second;
			q.erase(q.begin());
			for (auto& edge : graph[from])
			{
				int to = edge.first;
				ll w = edge.second;
				if (d[from] + w < d[to])
				{
					q.erase(std::make_pair(d[to], to ));
					d[to] = d[from] + w;
					q.insert(std::make_pair(d[to], to));
				}
			}
		}
		dp = vll(n, inf);
		forin
			if (contains[i][s[j]])
				dp[i] = min(d[vtx(i, 0)], d[vtx(i, 1)]) + c;
	}

	ll ans = *min_element(all(dp));
	if (ans == inf)
		write - 1;
	else
		write ans;
	writeln;
	
	std::cout << ld(clock()) / CLOCKS_PER_SEC << endl;

	return 0;
}