class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: D = None
        self.v: G = None
        self.z: B = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.x: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.y: J = None
        self.o: I = None
        self.s: E = None
        self.w: J = None
        self.u: I = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: C = None
        self.x: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.y: J = None
        self.o: I = None
        self.s: E = None
        self.w: J = None
        self.u: I = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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