class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: B = None
        self.o: C = None
        self.w: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: B = None
        self.v: G = None
        self.s: G = None
        self.o: G = None
        self.t: D = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: D = None
        self.v: C = None
        self.z: C = None
        self.o: B = None
        self.u: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: B = None
        self.v: G = None
        self.s: G = None
        self.o: G = None
        self.t: D = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: D = None
        self.v: C = None
        self.z: C = None
        self.o: B = None
        self.u: G = None
        self.w: D = None
        self.txt = txt

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

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

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