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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: F = None
        self.u: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: D = None
        self.o: E = None
        self.q: F = None
        self.z: E = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: F = None
        self.u: G = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: D = None
        self.o: E = None
        self.q: F = None
        self.z: E = None
        self.w: H = None
        self.txt = txt

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

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