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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: B = None
        self.r: G = None
        self.z: H = None
        self.w: F = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: C = None
        self.o: C = None
        self.x: B = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: B = None
        self.r: G = None
        self.z: H = None
        self.w: F = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: C = None
        self.o: C = None
        self.x: B = None
        self.t: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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