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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: B = None
        self.v: J = None
        self.s: G = None
        self.o: H = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.q: E = None
        self.z: G = None
        self.o: H = None
        self.x: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: H = None
        self.v: C = None
        self.t: B = None
        self.w: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: B = None
        self.v: J = None
        self.s: G = None
        self.o: H = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: C = None
        self.q: E = None
        self.z: G = None
        self.o: H = None
        self.x: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: H = None
        self.v: C = None
        self.t: B = None
        self.w: F = None
        self.txt = txt

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

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

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