class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: D = None
        self.x: E = None
        self.t: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: D = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: C = None
        self.p: A = None
        self.txt = txt

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

e = A("e")
h = B("h")
g = C("g")
n = D("n")
m = E("m")
i = F("i")
c = D("c")
a = D("a")
k = C("k")
l = B("l")

e.w = i
e.t = i
e.q = c
e.x = m
e.s = n
h.v = g
h.w = c
h.s = m
g.z = e
n.x = e
m.t = e
m.p = e
m.o = k
i.p = h
i.u = h
i.o = c
c.x = e
a.x = e
k.z = e
l.v = k
l.w = c
l.s = m
assert n.x.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: D = None
        self.x: E = None
        self.t: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: D = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: C = None
        self.p: A = None
        self.txt = txt

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

e = A("e")
h = B("h")
g = C("g")
n = D("n")
m = E("m")
i = F("i")
c = D("c")
a = D("a")
k = C("k")
l = B("l")

e.w = i
e.t = i
e.q = c
e.x = m
e.s = n
h.v = g
h.w = c
h.s = m
g.z = e
n.x = e
m.t = e
m.p = e
m.o = k
i.p = h
i.u = h
i.o = c
c.x = e
a.x = e
k.z = e
l.v = k
l.w = c
l.s = m
assert n.x.w.p.txt == "h"