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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: H = None
        self.w: B = None
        self.z: H = None
        self.s: B = None
        self.r: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: D = None
        self.v: C = None
        self.u: A = None
        self.w: C = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: H = None
        self.w: B = None
        self.z: H = None
        self.s: B = None
        self.r: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: D = None
        self.v: C = None
        self.u: A = None
        self.w: C = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: A = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: A = None
        self.txt = txt

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

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