class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.s: H = None
        self.u: C = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: E = None
        self.v: G = None
        self.y: F = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: G = None
        self.v: H = None
        self.y: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: G = None
        self.w: D = None
        self.o: G = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.x: B = None
        self.w: B = None
        self.q: C = None
        self.u: C = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.v: F = None
        self.p: D = None
        self.t: B = None
        self.y: E = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.s: H = None
        self.u: C = None
        self.r: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: E = None
        self.v: G = None
        self.y: F = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: G = None
        self.v: H = None
        self.y: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: G = None
        self.w: D = None
        self.o: G = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: D = None
        self.x: B = None
        self.w: B = None
        self.q: C = None
        self.u: C = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: D = None
        self.v: F = None
        self.p: D = None
        self.t: B = None
        self.y: E = None
        self.s: B = None
        self.txt = txt

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

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