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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.r: J = None
        self.w: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: F = None
        self.v: G = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: G = None
        self.r: E = None
        self.q: I = None
        self.u: I = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: J = None
        self.q: J = None
        self.o: J = None
        self.u: E = None
        self.y: C = None
        self.r: E = None
        self.z: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.r: J = None
        self.w: E = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: F = None
        self.v: G = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: G = None
        self.r: E = None
        self.q: I = None
        self.u: I = None
        self.o: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: J = None
        self.q: J = None
        self.o: J = None
        self.u: E = None
        self.y: C = None
        self.r: E = None
        self.z: C = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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