class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: G = None
        self.x: E = None
        self.s: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: J = None
        self.o: A = None
        self.y: I = None
        self.p: J = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: E = None
        self.q: J = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: F = None
        self.r: J = None
        self.o: B = None
        self.t: B = None
        self.z: F = None
        self.x: H = None
        self.s: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.v: B = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: J = None
        self.o: A = None
        self.y: I = None
        self.p: J = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: E = None
        self.q: J = None
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: F = None
        self.r: J = None
        self.o: B = None
        self.t: B = None
        self.z: F = None
        self.x: H = None
        self.s: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.v: B = None
        self.y: A = None
        self.u: C = None
        self.txt = txt

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

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