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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: A = None
        self.o: G = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: A = None
        self.p: H = None
        self.z: A = None
        self.y: E = None
        self.v: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: A = None
        self.o: G = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: A = None
        self.p: H = None
        self.z: A = None
        self.y: E = None
        self.v: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: C = None
        self.txt = txt

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

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