class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.x: I = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: F = None
        self.z: F = None
        self.o: H = None
        self.q: I = None
        self.y: J = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: A = None
        self.r: C = None
        self.u: J = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.y: E = None
        self.t: B = None
        self.q: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: F = None
        self.z: F = None
        self.o: H = None
        self.q: I = None
        self.y: J = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: A = None
        self.r: C = None
        self.u: J = None
        self.s: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: D = None
        self.y: E = None
        self.t: B = None
        self.q: J = None
        self.txt = txt

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

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

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