class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: I = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

f = A("f")
b = B("b")
c = C("c")
m = D("m")
l = E("l")
e = F("e")
i = G("i")
n = H("n")
k = I("k")
h = J("h")

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

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

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

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

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

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

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

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

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

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

f = A("f")
b = B("b")
c = C("c")
m = D("m")
l = E("l")
e = F("e")
i = G("i")
n = H("n")
k = I("k")
h = J("h")

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