class A:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: H = None
        self.x: I = None
        self.z: E = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: I = None
        self.o: F = None
        self.s: A = None
        self.r: D = None
        self.w: A = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: A = None
        self.u: G = None
        self.o: D = None
        self.z: E = None
        self.y: G = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: F = None
        self.x: A = None
        self.y: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: H = None
        self.x: I = None
        self.z: E = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: I = None
        self.o: F = None
        self.s: A = None
        self.r: D = None
        self.w: A = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: A = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: A = None
        self.u: G = None
        self.o: D = None
        self.z: E = None
        self.y: G = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: F = None
        self.x: A = None
        self.y: J = None
        self.txt = txt

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

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

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