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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.u: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: J = None
        self.y: A = None
        self.z: G = None
        self.v: A = None
        self.u: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: D = None
        self.o: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: D = None
        self.v: E = None
        self.w: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.w: F = None
        self.u: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: J = None
        self.y: A = None
        self.z: G = None
        self.v: A = None
        self.u: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: D = None
        self.o: E = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: D = None
        self.v: E = None
        self.w: G = None
        self.txt = txt

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

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