class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: D = None
        self.t: D = None
        self.o: D = None
        self.x: D = None
        self.z: H = None
        self.s: G = None
        self.p: D = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: H = None
        self.y: A = None
        self.w: B = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: A = None
        self.t: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: F = None
        self.y: F = None
        self.r: H = None
        self.z: H = None
        self.w: I = None
        self.x: E = None
        self.o: F = None
        self.t: I = None
        self.txt = txt

h = A("h")
g = B("g")
c = C("c")
m = D("m")
k = E("k")
j = F("j")
e = G("e")
f = H("f")
n = I("n")
l = J("l")

h.q = g
h.r = m
g.s = n
c.y = n
c.t = h
m.s = l
m.r = g
m.p = n
m.q = k
m.t = f
m.x = f
m.u = c
m.z = j
k.y = f
k.z = f
k.w = f
k.r = m
k.t = m
k.o = m
k.x = m
k.p = m
k.s = e
j.v = g
j.w = g
j.s = f
j.y = h
j.q = n
e.z = l
e.t = l
e.w = h
f.t = j
f.o = l
f.r = h
n.w = e
n.y = h
l.v = g
l.s = j
l.y = j
l.o = j
l.r = f
l.z = f
l.w = n
l.t = n
l.x = k
assert e.t.x.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: D = None
        self.t: D = None
        self.o: D = None
        self.x: D = None
        self.z: H = None
        self.s: G = None
        self.p: D = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: H = None
        self.y: A = None
        self.w: B = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: A = None
        self.t: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: F = None
        self.y: F = None
        self.r: H = None
        self.z: H = None
        self.w: I = None
        self.x: E = None
        self.o: F = None
        self.t: I = None
        self.txt = txt

h = A("h")
g = B("g")
c = C("c")
m = D("m")
k = E("k")
j = F("j")
e = G("e")
f = H("f")
n = I("n")
l = J("l")

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