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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: A = None
        self.u: J = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: I = None
        self.p: H = None
        self.w: H = None
        self.y: D = None
        self.u: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: H = None
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: A = None
        self.u: J = None
        self.o: F = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: I = None
        self.p: H = None
        self.w: H = None
        self.y: D = None
        self.u: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: H = None
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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