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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: G = None
        self.q: A = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: H = None
        self.v: B = None
        self.o: C = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: H = None
        self.u: C = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.u: E = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: G = None
        self.q: A = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: H = None
        self.v: B = None
        self.o: C = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: H = None
        self.u: C = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: D = None
        self.u: E = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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