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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: H = None
        self.x: D = None
        self.u: A = None
        self.q: I = None
        self.p: I = None
        self.w: H = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: I = None
        self.u: E = None
        self.q: E = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: D = None
        self.q: D = None
        self.s: J = None
        self.p: D = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: H = None
        self.x: D = None
        self.u: A = None
        self.q: I = None
        self.p: I = None
        self.w: H = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: I = None
        self.u: E = None
        self.q: E = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: D = None
        self.q: D = None
        self.s: J = None
        self.p: D = None
        self.t: E = None
        self.txt = txt

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

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

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