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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: C = None
        self.t: B = None
        self.y: J = None
        self.u: I = None
        self.p: E = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: I = None
        self.o: G = None
        self.z: I = None
        self.s: B = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: J = None
        self.w: F = None
        self.o: E = None
        self.x: C = None
        self.v: F = None
        self.u: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.w: H = None
        self.s: E = None
        self.y: E = None
        self.r: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: C = None
        self.t: B = None
        self.y: J = None
        self.u: I = None
        self.p: E = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: I = None
        self.o: G = None
        self.z: I = None
        self.s: B = None
        self.q: G = None
        self.p: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: J = None
        self.w: F = None
        self.o: E = None
        self.x: C = None
        self.v: F = None
        self.u: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.w: H = None
        self.s: E = None
        self.y: E = None
        self.r: I = None
        self.txt = txt

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

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