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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: I = None
        self.q: I = None
        self.u: J = None
        self.s: A = None
        self.r: I = None
        self.t: C = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: I = None
        self.q: I = None
        self.u: J = None
        self.s: A = None
        self.r: I = None
        self.t: C = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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