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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.v: B = None
        self.q: H = None
        self.z: F = None
        self.y: B = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

c = A("c")
a = B("a")
j = C("j")
h = D("h")
f = E("f")
k = F("k")
d = G("d")
m = H("m")
n = I("n")
g = J("g")

c.p = k
c.z = g
c.r = j
c.u = a
a.x = f
a.t = k
j.q = k
j.x = k
j.z = a
h.o = a
h.r = a
h.v = a
h.y = a
h.q = m
h.w = m
h.z = k
f.w = n
f.u = j
k.w = d
k.v = d
k.x = f
k.p = f
k.s = f
k.z = h
k.t = m
k.y = a
k.u = n
d.u = n
d.o = g
d.q = g
d.z = g
d.p = g
d.v = a
d.t = a
d.y = c
m.q = n
n.t = d
n.u = k
n.r = g
n.o = g
n.p = h
n.y = j
g.t = m
g.w = m
g.r = a
g.y = j
g.x = f
g.q = d
assert a.t.x.u.z.t.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: J = None
        self.r: C = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.v: B = None
        self.q: H = None
        self.z: F = None
        self.y: B = None
        self.w: H = None
        self.txt = txt

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

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

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

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

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

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

c = A("c")
a = B("a")
j = C("j")
h = D("h")
f = E("f")
k = F("k")
d = G("d")
m = H("m")
n = I("n")
g = J("g")

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