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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: J = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.w: F = None
        self.p: G = None
        self.s: D = None
        self.x: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: A = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: J = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: E = None
        self.w: F = None
        self.p: G = None
        self.s: D = None
        self.x: I = None
        self.txt = txt

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

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

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

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