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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.o: H = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: B = None
        self.o: H = None
        self.s: A = None
        self.txt = txt

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

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

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