class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: C = None
        self.p: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: C = None
        self.p: C = None
        self.v: C = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: C = None
        self.p: C = None
        self.v: C = None
        self.t: C = None
        self.txt = txt

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

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