class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: C = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: G = None
        self.y: C = None
        self.r: H = None
        self.t: G = None
        self.x: G = None
        self.q: H = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: A = None
        self.x: H = None
        self.s: A = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: H = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: F = None
        self.s: E = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: C = None
        self.q: G = None
        self.txt = txt

e = A("e")
f = B("f")
n = C("n")
j = D("j")
h = E("h")
l = F("l")
i = G("i")
a = H("a")
k = C("k")

e.q = f
e.x = j
f.s = a
f.x = k
f.q = l
f.t = j
n.o = e
n.u = i
n.t = i
n.x = i
n.y = k
n.r = a
n.q = a
n.z = h
j.t = i
j.q = e
j.s = e
j.x = a
j.o = f
h.z = a
h.p = a
h.w = n
l.o = f
l.t = e
l.u = j
i.x = a
i.u = l
i.v = l
i.s = h
a.v = e
a.o = n
a.q = i
k.o = e
k.u = i
k.t = i
k.x = i
k.y = n
k.r = a
k.q = a
k.z = h
assert i.x.o.q.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: C = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: G = None
        self.y: C = None
        self.r: H = None
        self.t: G = None
        self.x: G = None
        self.q: H = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: A = None
        self.x: H = None
        self.s: A = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: H = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: F = None
        self.s: E = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: C = None
        self.q: G = None
        self.txt = txt

e = A("e")
f = B("f")
n = C("n")
j = D("j")
h = E("h")
l = F("l")
i = G("i")
a = H("a")
k = C("k")

e.q = f
e.x = j
f.s = a
f.x = k
f.q = l
f.t = j
n.o = e
n.u = i
n.t = i
n.x = i
n.y = k
n.r = a
n.q = a
n.z = h
j.t = i
j.q = e
j.s = e
j.x = a
j.o = f
h.z = a
h.p = a
h.w = n
l.o = f
l.t = e
l.u = j
i.x = a
i.u = l
i.v = l
i.s = h
a.v = e
a.o = n
a.q = i
k.o = e
k.u = i
k.t = i
k.x = i
k.y = n
k.r = a
k.q = a
k.z = h
assert i.x.o.q.v.txt == "e"