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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: J = None
        self.s: E = None
        self.u: E = None
        self.p: C = None
        self.y: I = None
        self.r: J = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: C = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: J = None
        self.q: H = None
        self.y: G = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: J = None
        self.s: E = None
        self.u: E = None
        self.p: C = None
        self.y: I = None
        self.r: J = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: C = None
        self.z: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: J = None
        self.q: H = None
        self.y: G = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

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

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

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