class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: D = None
        self.w: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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