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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

n = A("n")
l = B("l")
c = C("c")
d = D("d")
a = E("a")
i = F("i")
g = G("g")
e = H("e")
j = A("j")
m = G("m")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

n = A("n")
l = B("l")
c = C("c")
d = D("d")
a = E("a")
i = F("i")
g = G("g")
e = H("e")
j = A("j")
m = G("m")

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