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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: E = None
        self.t: F = None
        self.p: D = None
        self.y: C = None
        self.v: F = None
        self.u: C = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: G = None
        self.z: F = None
        self.p: F = None
        self.u: G = None
        self.r: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: F = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: A = None
        self.o: A = None
        self.w: A = None
        self.z: A = None
        self.x: F = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: E = None
        self.t: F = None
        self.p: D = None
        self.y: C = None
        self.v: F = None
        self.u: C = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: G = None
        self.z: F = None
        self.p: F = None
        self.u: G = None
        self.r: G = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: F = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: A = None
        self.o: A = None
        self.w: A = None
        self.z: A = None
        self.x: F = None
        self.u: G = None
        self.txt = txt

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

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