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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: F = None
        self.q: G = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: D = None
        self.w: D = None
        self.p: G = None
        self.q: D = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: G = None
        self.r: B = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: F = None
        self.s: C = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: H = None
        self.s: H = None
        self.u: A = None
        self.w: H = None
        self.q: D = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: F = None
        self.q: G = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: D = None
        self.w: D = None
        self.p: G = None
        self.q: D = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: G = None
        self.r: B = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: F = None
        self.s: C = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: H = None
        self.s: H = None
        self.u: A = None
        self.w: H = None
        self.q: D = None
        self.y: A = None
        self.txt = txt

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

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

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

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