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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: H = None
        self.v: D = None
        self.w: I = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: A = None
        self.p: A = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.p: D = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: F = None
        self.q: B = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: D = None
        self.txt = txt

n = A("n")
j = B("j")
d = C("d")
a = D("a")
l = E("l")
b = F("b")
m = G("m")
g = H("g")
k = I("k")
h = H("h")

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: H = None
        self.v: D = None
        self.w: I = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: A = None
        self.p: A = None
        self.z: C = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: C = None
        self.p: D = None
        self.y: B = None
        self.u: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: F = None
        self.q: B = None
        self.r: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: D = None
        self.txt = txt

n = A("n")
j = B("j")
d = C("d")
a = D("a")
l = E("l")
b = F("b")
m = G("m")
g = H("g")
k = I("k")
h = H("h")

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