class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: H = None
        self.s: C = None
        self.o: D = None
        self.x: D = None
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: E = None
        self.x: A = None
        self.p: B = None
        self.v: F = None
        self.o: F = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.p: B = None
        self.r: F = None
        self.q: F = None
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.s: F = None
        self.o: D = None
        self.q: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: E = None
        self.x: A = None
        self.p: B = None
        self.v: F = None
        self.o: F = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: E = None
        self.p: B = None
        self.r: F = None
        self.q: F = None
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: F = None
        self.s: F = None
        self.o: D = None
        self.q: G = None
        self.txt = txt

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

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