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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: A = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: H = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: F = None
        self.x: D = None
        self.u: F = None
        self.z: F = None
        self.s: B = None
        self.r: H = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: A = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: H = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: F = None
        self.x: D = None
        self.u: F = None
        self.z: F = None
        self.s: B = None
        self.r: H = None
        self.txt = txt

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

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

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