class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.r: E = None
        self.q: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: I = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: F = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.r: B = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: H = None
        self.o: H = None
        self.r: G = None
        self.q: D = None
        self.t: A = None
        self.x: D = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: I = None
        self.p: C = None
        self.r: B = None
        self.z: H = None
        self.y: I = None
        self.txt = txt

f = A("f")
m = B("m")
j = C("j")
c = D("c")
n = E("n")
a = F("a")
i = G("i")
e = H("e")
d = I("d")
g = J("g")

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: I = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: F = None
        self.q: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: F = None
        self.r: B = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: H = None
        self.o: H = None
        self.r: G = None
        self.q: D = None
        self.t: A = None
        self.x: D = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: I = None
        self.p: C = None
        self.r: B = None
        self.z: H = None
        self.y: I = None
        self.txt = txt

f = A("f")
m = B("m")
j = C("j")
c = D("c")
n = E("n")
a = F("a")
i = G("i")
e = H("e")
d = I("d")
g = J("g")

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