class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: G = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: H = None
        self.p: F = None
        self.x: F = None
        self.s: E = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: A = None
        self.v: E = None
        self.u: A = None
        self.y: F = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: B = None
        self.q: F = None
        self.w: H = None
        self.r: D = None
        self.u: B = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: A = None
        self.q: B = None
        self.x: A = None
        self.p: B = None
        self.u: E = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: G = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: H = None
        self.p: F = None
        self.x: F = None
        self.s: E = None
        self.o: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: A = None
        self.v: E = None
        self.u: A = None
        self.y: F = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: B = None
        self.q: F = None
        self.w: H = None
        self.r: D = None
        self.u: B = None
        self.o: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: A = None
        self.q: B = None
        self.x: A = None
        self.p: B = None
        self.u: E = None
        self.r: A = None
        self.txt = txt

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

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