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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: D = None
        self.w: F = None
        self.o: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: F = None
        self.o: H = None
        self.r: B = None
        self.p: G = None
        self.x: G = None
        self.v: F = None
        self.y: G = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: D = None
        self.x: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.t: C = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: D = None
        self.w: F = None
        self.o: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: F = None
        self.o: H = None
        self.r: B = None
        self.p: G = None
        self.x: G = None
        self.v: F = None
        self.y: G = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: D = None
        self.x: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.t: C = None
        self.w: B = None
        self.txt = txt

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

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