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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: F = None
        self.x: G = None
        self.r: D = None
        self.z: G = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: F = None
        self.x: G = None
        self.r: D = None
        self.z: G = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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