class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: I = None
        self.v: B = None
        self.x: B = None
        self.r: A = None
        self.y: I = None
        self.t: B = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: I = None
        self.z: E = None
        self.x: I = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: D = None
        self.t: G = None
        self.y: C = None
        self.v: A = None
        self.r: A = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: I = None
        self.v: B = None
        self.x: B = None
        self.r: A = None
        self.y: I = None
        self.t: B = None
        self.z: E = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: I = None
        self.z: E = None
        self.x: I = None
        self.s: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: D = None
        self.t: G = None
        self.y: C = None
        self.v: A = None
        self.r: A = None
        self.p: E = None
        self.txt = txt

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

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