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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: B = None
        self.o: D = None
        self.u: G = None
        self.p: H = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: B = None
        self.o: D = None
        self.u: G = None
        self.p: H = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: A = None
        self.txt = txt

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

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