class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: D = None
        self.y: D = None
        self.z: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.u: A = None
        self.v: H = None
        self.t: H = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: I = None
        self.u: D = None
        self.r: G = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: I = None
        self.q: G = None
        self.s: C = None
        self.w: E = None
        self.x: I = None
        self.o: A = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.x: B = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.u: G = None
        self.p: C = None
        self.w: I = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.u: A = None
        self.v: H = None
        self.t: H = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: I = None
        self.u: D = None
        self.r: G = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: I = None
        self.q: G = None
        self.s: C = None
        self.w: E = None
        self.x: I = None
        self.o: A = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.x: B = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: C = None
        self.u: G = None
        self.p: C = None
        self.w: I = None
        self.q: B = None
        self.txt = txt

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

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

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