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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.z: A = None
        self.t: G = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: B = None
        self.v: B = None
        self.w: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.s: B = None
        self.t: C = None
        self.v: B = None
        self.txt = txt

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

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

e = A("e")
m = B("m")
g = C("g")
n = D("n")
h = E("h")
j = F("j")
f = G("f")
a = G("a")
c = F("c")
l = E("l")

e.u = f
m.u = a
m.t = a
m.w = n
m.s = n
m.z = e
g.y = f
g.w = a
g.o = n
g.s = n
g.r = e
n.y = f
n.x = m
n.v = m
n.w = m
n.r = g
h.q = a
h.p = c
h.s = m
h.v = m
h.t = g
j.u = g
j.t = h
j.y = n
j.s = e
j.r = e
j.z = a
f.t = g
a.t = g
c.u = g
c.t = h
c.y = n
c.s = e
c.r = e
c.z = a
l.q = a
l.p = c
l.s = m
l.v = m
l.t = g
assert m.u.t.s.y.t.s.r.w.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.z: A = None
        self.t: G = None
        self.s: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: B = None
        self.v: B = None
        self.w: B = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: F = None
        self.s: B = None
        self.t: C = None
        self.v: B = None
        self.txt = txt

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

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

e = A("e")
m = B("m")
g = C("g")
n = D("n")
h = E("h")
j = F("j")
f = G("f")
a = G("a")
c = F("c")
l = E("l")

e.u = f
m.u = a
m.t = a
m.w = n
m.s = n
m.z = e
g.y = f
g.w = a
g.o = n
g.s = n
g.r = e
n.y = f
n.x = m
n.v = m
n.w = m
n.r = g
h.q = a
h.p = c
h.s = m
h.v = m
h.t = g
j.u = g
j.t = h
j.y = n
j.s = e
j.r = e
j.z = a
f.t = g
a.t = g
c.u = g
c.t = h
c.y = n
c.s = e
c.r = e
c.z = a
l.q = a
l.p = c
l.s = m
l.v = m
l.t = g
assert m.u.t.s.y.t.s.r.w.t.txt == "g"