class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: J = None
        self.z: B = None
        self.w: F = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.s: C = None
        self.w: E = None
        self.r: H = None
        self.p: G = None
        self.o: H = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: H = None
        self.s: B = None
        self.x: H = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.s: I = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.p: A = None
        self.w: B = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: I = None
        self.o: J = None
        self.y: C = None
        self.w: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.s: C = None
        self.w: E = None
        self.r: H = None
        self.p: G = None
        self.o: H = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: H = None
        self.s: B = None
        self.x: H = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.s: I = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: C = None
        self.p: A = None
        self.w: B = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: I = None
        self.o: J = None
        self.y: C = None
        self.w: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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