class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: E = None
        self.q: D = None
        self.w: J = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: J = None
        self.q: D = None
        self.y: H = None
        self.z: I = None
        self.w: G = None
        self.t: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: A = None
        self.r: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: E = None
        self.w: H = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: I = None
        self.z: H = None
        self.o: D = None
        self.p: C = None
        self.r: J = None
        self.s: A = None
        self.v: A = None
        self.t: J = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: A = None
        self.txt = txt

i = A("i")
j = B("j")
m = C("m")
k = D("k")
d = E("d")
h = F("h")
l = G("l")
c = H("c")
a = I("a")
e = J("e")

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: J = None
        self.q: D = None
        self.y: H = None
        self.z: I = None
        self.w: G = None
        self.t: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: A = None
        self.r: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: E = None
        self.w: H = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: I = None
        self.z: H = None
        self.o: D = None
        self.p: C = None
        self.r: J = None
        self.s: A = None
        self.v: A = None
        self.t: J = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: A = None
        self.txt = txt

i = A("i")
j = B("j")
m = C("m")
k = D("k")
d = E("d")
h = F("h")
l = G("l")
c = H("c")
a = I("a")
e = J("e")

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