class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: I = None
        self.t: C = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: H = None
        self.z: F = None
        self.q: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: B = None
        self.o: F = None
        self.t: F = None
        self.x: A = None
        self.w: A = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: G = None
        self.o: B = None
        self.x: B = None
        self.w: G = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: E = None
        self.z: B = None
        self.r: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.z: C = None
        self.s: C = None
        self.y: G = None
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: H = None
        self.z: F = None
        self.q: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: B = None
        self.o: F = None
        self.t: F = None
        self.x: A = None
        self.w: A = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: G = None
        self.o: B = None
        self.x: B = None
        self.w: G = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: E = None
        self.z: B = None
        self.r: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.z: C = None
        self.s: C = None
        self.y: G = None
        self.w: A = None
        self.txt = txt

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

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