class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: F = None
        self.w: B = None
        self.t: I = None
        self.r: D = None
        self.z: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.r: G = None
        self.t: G = None
        self.y: G = None
        self.o: A = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: I = None
        self.o: E = None
        self.v: E = None
        self.y: A = None
        self.q: C = None
        self.w: C = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: A = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.r: G = None
        self.t: G = None
        self.y: G = None
        self.o: A = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: I = None
        self.o: E = None
        self.v: E = None
        self.y: A = None
        self.q: C = None
        self.w: C = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: A = None
        self.p: G = None
        self.txt = txt

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

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