class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: J = None
        self.t: G = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: F = None
        self.u: G = None
        self.p: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: I = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: A = None
        self.p: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: A = None
        self.z: H = None
        self.q: I = None
        self.y: G = None
        self.p: G = None
        self.v: I = None
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: F = None
        self.u: G = None
        self.p: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: I = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: A = None
        self.p: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: A = None
        self.z: H = None
        self.q: I = None
        self.y: G = None
        self.p: G = None
        self.v: I = None
        self.x: C = None
        self.txt = txt

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

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