class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: C = None
        self.z: J = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: B = None
        self.s: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.r: B = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: C = None
        self.txt = txt

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

j.r = c
l.s = j
l.p = g
l.z = h
l.t = k
g.v = k
g.t = h
g.r = n
f.s = a
c.r = a
c.s = g
c.z = g
e.u = f
e.x = c
e.r = l
e.q = n
e.p = n
k.o = f
k.u = l
k.s = h
n.t = j
n.q = a
n.r = l
n.x = k
a.v = c
a.s = e
a.z = e
h.u = c
h.q = g
assert c.r.v.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: C = None
        self.z: J = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: C = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: B = None
        self.s: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: I = None
        self.r: B = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: C = None
        self.txt = txt

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

j.r = c
l.s = j
l.p = g
l.z = h
l.t = k
g.v = k
g.t = h
g.r = n
f.s = a
c.r = a
c.s = g
c.z = g
e.u = f
e.x = c
e.r = l
e.q = n
e.p = n
k.o = f
k.u = l
k.s = h
n.t = j
n.q = a
n.r = l
n.x = k
a.v = c
a.s = e
a.z = e
h.u = c
h.q = g
assert c.r.v.r.v.txt == "c"