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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: F = None
        self.t: G = None
        self.o: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: F = None
        self.t: G = None
        self.o: C = None
        self.txt = txt

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

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