class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: J = None
        self.y: J = None
        self.w: H = None
        self.t: D = None
        self.s: C = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: D = None
        self.u: F = None
        self.p: I = None
        self.w: I = None
        self.x: E = None
        self.s: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: I = None
        self.v: A = None
        self.s: I = None
        self.p: I = None
        self.y: C = None
        self.r: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: G = None
        self.s: E = None
        self.v: F = None
        self.z: A = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: D = None
        self.u: F = None
        self.p: I = None
        self.w: I = None
        self.x: E = None
        self.s: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: I = None
        self.v: A = None
        self.s: I = None
        self.p: I = None
        self.y: C = None
        self.r: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: G = None
        self.s: E = None
        self.v: F = None
        self.z: A = None
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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