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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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