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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: J = None
        self.s: D = None
        self.w: G = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: J = None
        self.w: B = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: D = None
        self.v: F = None
        self.x: A = None
        self.t: B = None
        self.p: F = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: G = None
        self.p: J = None
        self.s: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: J = None
        self.s: D = None
        self.w: G = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: J = None
        self.w: B = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: D = None
        self.v: F = None
        self.x: A = None
        self.t: B = None
        self.p: F = None
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: G = None
        self.p: J = None
        self.s: H = None
        self.txt = txt

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

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

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