class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: E = None
        self.r: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: G = None
        self.r: F = None
        self.z: E = None
        self.o: E = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: B = None
        self.q: C = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: D = None
        self.u: F = None
        self.w: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: D = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: G = None
        self.r: F = None
        self.z: E = None
        self.o: E = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: B = None
        self.q: C = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: D = None
        self.u: F = None
        self.w: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: D = None
        self.q: C = None
        self.txt = txt

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

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