class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: I = None
        self.u: C = None
        self.o: C = None
        self.y: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

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

g.z = i
g.q = c
g.y = c
g.u = l
g.o = l
d.q = e
d.o = e
d.t = c
l.p = d
l.v = g
l.z = g
j.w = l
j.v = f
i.t = k
i.w = k
i.o = l
i.p = l
i.y = f
i.z = c
i.v = c
i.x = g
i.r = d
k.u = c
k.q = l
k.z = i
f.x = c
f.p = c
f.o = e
f.t = j
f.u = i
e.q = f
e.o = c
c.x = k
c.y = k
c.r = g
assert c.x.z.r.t.x.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: I = None
        self.u: C = None
        self.o: C = None
        self.y: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: F = None
        self.r: A = None
        self.txt = txt

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

g.z = i
g.q = c
g.y = c
g.u = l
g.o = l
d.q = e
d.o = e
d.t = c
l.p = d
l.v = g
l.z = g
j.w = l
j.v = f
i.t = k
i.w = k
i.o = l
i.p = l
i.y = f
i.z = c
i.v = c
i.x = g
i.r = d
k.u = c
k.q = l
k.z = i
f.x = c
f.p = c
f.o = e
f.t = j
f.u = i
e.q = f
e.o = c
c.x = k
c.y = k
c.r = g
assert c.x.z.r.t.x.txt == "k"