class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: E = None
        self.v: C = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: G = None
        self.q: A = None
        self.r: H = None
        self.z: H = None
        self.x: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.u: F = None
        self.w: A = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: H = None
        self.t: B = None
        self.z: F = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.v: B = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: D = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: G = None
        self.q: A = None
        self.r: H = None
        self.z: H = None
        self.x: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: A = None
        self.u: F = None
        self.w: A = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: H = None
        self.t: B = None
        self.z: F = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.v: B = None
        self.x: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: D = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

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