class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: D = None
        self.o: I = None
        self.x: C = None
        self.z: G = None
        self.w: I = None
        self.y: A = None
        self.r: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: C = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: F = None
        self.y: C = None
        self.r: I = None
        self.u: E = None
        self.v: I = None
        self.o: I = None
        self.x: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: D = None
        self.o: I = None
        self.x: C = None
        self.z: G = None
        self.w: I = None
        self.y: A = None
        self.r: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: C = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: F = None
        self.y: C = None
        self.r: I = None
        self.u: E = None
        self.v: I = None
        self.o: I = None
        self.x: F = None
        self.txt = txt

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

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

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