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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: A = None
        self.o: A = None
        self.x: C = None
        self.s: E = None
        self.z: E = None
        self.t: F = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: B = None
        self.z: H = None
        self.w: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: A = None
        self.o: A = None
        self.x: C = None
        self.s: E = None
        self.z: E = None
        self.t: F = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: B = None
        self.z: H = None
        self.w: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: C = None
        self.txt = txt

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

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