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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: D = None
        self.x: E = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: H = None
        self.s: D = None
        self.y: G = None
        self.x: C = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.q: G = None
        self.w: B = None
        self.s: H = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: D = None
        self.x: E = None
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: H = None
        self.s: D = None
        self.y: G = None
        self.x: C = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.q: G = None
        self.w: B = None
        self.s: H = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

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

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