class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: G = None
        self.p: C = None
        self.t: F = None
        self.z: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: H = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: E = None
        self.z: H = None
        self.r: A = None
        self.p: A = None
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: H = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: E = None
        self.z: H = None
        self.r: A = None
        self.p: A = None
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

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