class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: C = None
        self.q: B = None
        self.w: G = None
        self.o: H = None
        self.z: C = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

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

n = A("n")
f = B("f")
j = C("j")
l = D("l")
b = E("b")
d = F("d")
m = G("m")
h = H("h")

n.s = f
n.q = f
n.t = f
n.u = j
n.z = j
n.w = m
n.o = h
f.v = j
j.y = f
j.w = n
j.o = n
j.s = m
l.u = h
l.w = d
l.z = f
b.r = m
b.v = d
b.y = h
b.u = j
b.x = f
b.z = f
b.o = l
d.p = n
m.p = f
h.z = f
assert l.u.z.v.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: C = None
        self.q: B = None
        self.w: G = None
        self.o: H = None
        self.z: C = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

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

n = A("n")
f = B("f")
j = C("j")
l = D("l")
b = E("b")
d = F("d")
m = G("m")
h = H("h")

n.s = f
n.q = f
n.t = f
n.u = j
n.z = j
n.w = m
n.o = h
f.v = j
j.y = f
j.w = n
j.o = n
j.s = m
l.u = h
l.w = d
l.z = f
b.r = m
b.v = d
b.y = h
b.u = j
b.x = f
b.z = f
b.o = l
d.p = n
m.p = f
h.z = f
assert l.u.z.v.s.p.txt == "f"