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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: A = None
        self.o: J = None
        self.y: A = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: G = None
        self.v: A = None
        self.r: D = None
        self.o: B = None
        self.w: D = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: B = None
        self.r: J = None
        self.y: G = None
        self.v: H = None
        self.p: D = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.p: B = None
        self.u: A = None
        self.y: J = None
        self.t: B = None
        self.r: G = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: C = None
        self.v: A = None
        self.x: F = None
        self.u: A = None
        self.w: B = None
        self.r: I = None
        self.p: I = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: I = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.t: J = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: D = None
        self.z: G = None
        self.txt = txt

a = A("a")
j = B("j")
i = C("i")
l = D("l")
d = E("d")
b = F("b")
e = G("e")
k = H("k")
f = I("f")
h = J("h")

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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: A = None
        self.o: J = None
        self.y: A = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: G = None
        self.v: A = None
        self.r: D = None
        self.o: B = None
        self.w: D = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: B = None
        self.r: J = None
        self.y: G = None
        self.v: H = None
        self.p: D = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.p: B = None
        self.u: A = None
        self.y: J = None
        self.t: B = None
        self.r: G = None
        self.x: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.s: C = None
        self.v: A = None
        self.x: F = None
        self.u: A = None
        self.w: B = None
        self.r: I = None
        self.p: I = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: I = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: A = None
        self.t: J = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: D = None
        self.z: G = None
        self.txt = txt

a = A("a")
j = B("j")
i = C("i")
l = D("l")
d = E("d")
b = F("b")
e = G("e")
k = H("k")
f = I("f")
h = J("h")

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