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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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