class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.t: J = None
        self.z: H = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.r: B = None
        self.p: B = None
        self.z: D = None
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: C = None
        self.y: A = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: H = None
        self.r: A = None
        self.q: D = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: E = None
        self.z: F = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: A = None
        self.r: B = None
        self.p: B = None
        self.z: D = None
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: C = None
        self.y: A = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.u: H = None
        self.r: A = None
        self.q: D = None
        self.z: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: E = None
        self.z: F = None
        self.y: F = None
        self.t: F = None
        self.txt = txt

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

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