class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: I = None
        self.s: I = None
        self.z: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.r: H = None
        self.p: F = None
        self.q: I = None
        self.v: E = None
        self.t: D = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: C = None
        self.r: H = None
        self.p: F = None
        self.q: I = None
        self.v: E = None
        self.t: D = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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