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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: B = None
        self.y: E = None
        self.u: I = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: G = None
        self.o: D = None
        self.r: E = None
        self.p: B = None
        self.v: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.s: E = None
        self.w: G = None
        self.r: F = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.x: E = None
        self.w: B = None
        self.s: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: B = None
        self.y: E = None
        self.u: I = None
        self.r: B = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: E = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: G = None
        self.o: D = None
        self.r: E = None
        self.p: B = None
        self.v: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.s: E = None
        self.w: G = None
        self.r: F = None
        self.t: G = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.x: E = None
        self.w: B = None
        self.s: E = None
        self.txt = txt

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

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