class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: E = None
        self.w: G = None
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: C = None
        self.t: C = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: C = None
        self.x: J = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: J = None
        self.p: H = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: D = None
        self.u: D = None
        self.t: D = None
        self.q: H = None
        self.s: B = None
        self.y: J = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: G = None
        self.u: J = None
        self.q: G = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: J = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.u: E = None
        self.w: G = None
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: C = None
        self.t: C = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: C = None
        self.x: J = None
        self.y: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: J = None
        self.p: H = None
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: D = None
        self.u: D = None
        self.t: D = None
        self.q: H = None
        self.s: B = None
        self.y: J = None
        self.x: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: G = None
        self.u: J = None
        self.q: G = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: J = None
        self.q: H = None
        self.txt = txt

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

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

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