class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: F = None
        self.p: C = None
        self.u: D = None
        self.r: F = None
        self.t: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: H = None
        self.t: G = None
        self.w: G = None
        self.u: E = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: E = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: G = None
        self.v: E = None
        self.x: A = None
        self.s: F = None
        self.txt = txt

b = A("b")
k = B("k")
i = C("i")
j = D("j")
h = E("h")
n = F("n")
c = G("c")
f = H("f")
a = G("a")

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: H = None
        self.t: G = None
        self.w: G = None
        self.u: E = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: E = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: G = None
        self.v: E = None
        self.x: A = None
        self.s: F = None
        self.txt = txt

b = A("b")
k = B("k")
i = C("i")
j = D("j")
h = E("h")
n = F("n")
c = G("c")
f = H("f")
a = G("a")

b.s = f
b.q = n
b.r = n
b.p = i
b.t = i
b.u = j
b.y = k
k.z = b
i.q = a
i.t = a
i.x = f
i.w = c
i.u = h
i.p = k
j.s = k
h.v = a
n.v = f
n.u = h
n.z = k
c.s = b
f.r = b
f.x = b
f.u = a
f.v = h
f.s = n
a.s = b
assert h.v.s.p.p.z.u.txt == "j"