class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: G = None
        self.o: D = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.w: D = None
        self.u: C = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: C = None
        self.x: H = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: H = None
        self.z: F = None
        self.v: I = None
        self.q: H = None
        self.t: D = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.q: A = None
        self.o: E = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.w: D = None
        self.u: C = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: C = None
        self.x: H = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: H = None
        self.z: F = None
        self.v: I = None
        self.q: H = None
        self.t: D = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: E = None
        self.q: A = None
        self.o: E = None
        self.v: B = None
        self.u: F = None
        self.txt = txt

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

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

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