class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: B = None
        self.v: B = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: J = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.r: G = None
        self.q: J = None
        self.p: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: I = None
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: B = None
        self.v: B = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: J = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: E = None
        self.r: G = None
        self.q: J = None
        self.p: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: I = None
        self.x: D = None
        self.txt = txt

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

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