class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: A = None
        self.z: G = None
        self.w: A = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: G = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: E = None
        self.q: A = None
        self.o: A = None
        self.r: A = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: D = None
        self.y: C = None
        self.r: A = None
        self.z: B = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: G = None
        self.o: G = None
        self.w: B = None
        self.u: A = None
        self.s: A = None
        self.p: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: G = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: E = None
        self.q: A = None
        self.o: A = None
        self.r: A = None
        self.w: D = None
        self.z: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: D = None
        self.y: C = None
        self.r: A = None
        self.z: B = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: G = None
        self.o: G = None
        self.w: B = None
        self.u: A = None
        self.s: A = None
        self.p: E = None
        self.txt = txt

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

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

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