public static Fst<Pair<Character, Character>> formTo(CharSequence in,
			CharSequence out) {

		Fst<Pair<Character, Character>> bla = new Fst<>();
		if (in.length() == 0) {
			bla.addState(StateFlag.ACCEPT, StateFlag.INITIAL);
			return bla;
		}

		State previous = null;

		for (int i = 0; i < in.length(); i++) {
			State source = previous == null ? bla.addStateInitial() : previous;
			State target = i + 1 == in.length() ? bla.addStateAccept() : bla
					.addState();

			Transition<Pair<Character, Character>> transition = bla
					.addTransition(Pair.of(in.charAt(i), out.charAt(i)),
							source, target);
			previous = target;
		}
		return bla;
	}