class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: G = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: A = None
        self.v: A = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.u: B = None
        self.s: B = None
        self.t: I = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: J = None
        self.x: J = None
        self.w: F = None
        self.t: H = None
        self.p: E = None
        self.v: D = None
        self.r: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: A = None
        self.p: D = None
        self.r: I = None
        self.y: E = None
        self.x: D = None
        self.t: B = None
        self.z: G = None
        self.s: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: A = None
        self.v: A = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: E = None
        self.u: B = None
        self.s: B = None
        self.t: I = None
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.u: J = None
        self.x: J = None
        self.w: F = None
        self.t: H = None
        self.p: E = None
        self.v: D = None
        self.r: A = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: A = None
        self.p: D = None
        self.r: I = None
        self.y: E = None
        self.x: D = None
        self.t: B = None
        self.z: G = None
        self.s: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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