class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: F = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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