class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: I = None
        self.q: J = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: E = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.q: B = None
        self.o: D = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: H = None
        self.s: I = None
        self.u: F = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: E = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.q: B = None
        self.o: D = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: H = None
        self.s: I = None
        self.u: F = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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