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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.s: J = None
        self.q: A = None
        self.t: D = None
        self.v: J = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.s: J = None
        self.q: A = None
        self.t: D = None
        self.v: J = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: G = None
        self.txt = txt

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

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

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

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