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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: B = None
        self.x: I = None
        self.w: F = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: G = None
        self.v: A = None
        self.r: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: H = None
        self.x: H = None
        self.r: D = None
        self.o: C = None
        self.y: D = None
        self.v: B = None
        self.p: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: E = None
        self.y: A = None
        self.s: I = None
        self.q: A = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: J = None
        self.r: B = None
        self.x: I = None
        self.w: F = None
        self.v: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: G = None
        self.v: A = None
        self.r: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: H = None
        self.x: H = None
        self.r: D = None
        self.o: C = None
        self.y: D = None
        self.v: B = None
        self.p: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: E = None
        self.y: A = None
        self.s: I = None
        self.q: A = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

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

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