class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.q: A = None
        self.t: G = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: H = None
        self.y: H = None
        self.r: E = None
        self.s: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.q: E = None
        self.y: D = None
        self.v: H = None
        self.w: D = None
        self.o: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.q: A = None
        self.t: G = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: H = None
        self.y: H = None
        self.r: E = None
        self.s: F = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: C = None
        self.q: E = None
        self.y: D = None
        self.v: H = None
        self.w: D = None
        self.o: D = None
        self.txt = txt

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

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

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