class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: D = None
        self.r: B = None
        self.q: C = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.s: H = None
        self.r: C = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

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

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

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

m = A("m")
j = B("j")
l = C("l")
n = D("n")
i = E("i")
d = F("d")
e = G("e")
g = H("g")

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: G = None
        self.t: E = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.s: H = None
        self.r: C = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

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

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

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

m = A("m")
j = B("j")
l = C("l")
n = D("n")
i = E("i")
d = F("d")
e = G("e")
g = H("g")

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