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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: F = None
        self.y: B = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.v: D = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: E = None
        self.t: B = None
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: F = None
        self.y: B = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: G = None
        self.v: D = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: E = None
        self.t: B = None
        self.r: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: D = None
        self.txt = txt

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

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