class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: J = None
        self.u: B = None
        self.x: B = None
        self.q: H = None
        self.w: J = None
        self.o: C = None
        self.y: B = None
        self.s: G = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: H = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: H = None
        self.t: I = None
        self.x: J = None
        self.s: J = None
        self.v: F = None
        self.z: I = None
        self.p: D = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: F = None
        self.x: E = None
        self.q: A = None
        self.o: A = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: C = None
        self.x: G = None
        self.w: G = None
        self.o: H = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: H = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: H = None
        self.t: I = None
        self.x: J = None
        self.s: J = None
        self.v: F = None
        self.z: I = None
        self.p: D = None
        self.y: E = None
        self.u: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: F = None
        self.x: E = None
        self.q: A = None
        self.o: A = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: C = None
        self.x: G = None
        self.w: G = None
        self.o: H = None
        self.v: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.v: D = None
        self.txt = txt

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

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