class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: C = None
        self.z: E = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: E = None
        self.w: B = None
        self.u: D = None
        self.y: E = None
        self.p: C = None
        self.q: I = None
        self.v: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: C = None
        self.v: F = None
        self.u: H = None
        self.s: E = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: C = None
        self.z: E = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: E = None
        self.w: B = None
        self.u: D = None
        self.y: E = None
        self.p: C = None
        self.q: I = None
        self.v: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: C = None
        self.v: F = None
        self.u: H = None
        self.s: E = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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