class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: D = None
        self.x: B = None
        self.q: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: B = None
        self.q: C = None
        self.u: A = None
        self.p: A = None
        self.x: G = None
        self.z: G = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: H = None
        self.x: E = None
        self.o: F = None
        self.u: D = None
        self.t: H = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.v: B = None
        self.q: C = None
        self.u: A = None
        self.p: A = None
        self.x: G = None
        self.z: G = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: H = None
        self.x: E = None
        self.o: F = None
        self.u: D = None
        self.t: H = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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