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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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