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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: I = None
        self.y: J = None
        self.v: J = None
        self.z: A = None
        self.r: I = None
        self.o: E = None
        self.p: F = None
        self.w: J = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: J = None
        self.q: A = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

c = A("c")
f = B("f")
a = C("a")
i = D("i")
e = E("e")
m = F("m")
b = G("b")
j = H("j")
d = I("d")
n = J("n")

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: I = None
        self.y: J = None
        self.v: J = None
        self.z: A = None
        self.r: I = None
        self.o: E = None
        self.p: F = None
        self.w: J = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: J = None
        self.q: A = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

c = A("c")
f = B("f")
a = C("a")
i = D("i")
e = E("e")
m = F("m")
b = G("b")
j = H("j")
d = I("d")
n = J("n")

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