class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: I = None
        self.o: G = None
        self.q: H = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: C = None
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: E = None
        self.u: C = None
        self.r: J = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: C = None
        self.q: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.q: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: E = None
        self.u: C = None
        self.r: J = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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