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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: H = None
        self.t: A = None
        self.r: J = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.s: G = None
        self.q: I = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: J = None
        self.w: G = None
        self.s: I = None
        self.x: I = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.r: B = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.q: C = None
        self.o: G = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: J = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: I = None
        self.v: F = None
        self.w: I = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: H = None
        self.t: A = None
        self.r: J = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: C = None
        self.s: G = None
        self.q: I = None
        self.y: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.t: J = None
        self.w: G = None
        self.s: I = None
        self.x: I = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.r: B = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.q: C = None
        self.o: G = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: J = None
        self.o: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: I = None
        self.v: F = None
        self.w: I = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

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

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