class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.v: H = None
        self.x: C = None
        self.r: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.x: A = None
        self.p: F = None
        self.r: G = None
        self.s: G = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.x: A = None
        self.p: F = None
        self.r: G = None
        self.s: G = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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