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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.o: J = None
        self.v: B = None
        self.q: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: I = None
        self.y: G = None
        self.x: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.w: G = None
        self.t: C = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.o: J = None
        self.v: B = None
        self.q: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: I = None
        self.y: G = None
        self.x: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.z: D = None
        self.w: G = None
        self.t: C = None
        self.o: D = None
        self.p: E = None
        self.txt = txt

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

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