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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: A = None
        self.p: E = None
        self.s: A = None
        self.q: G = None
        self.u: F = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: C = None
        self.z: G = None
        self.y: G = None
        self.u: B = None
        self.w: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.v: A = None
        self.u: D = None
        self.q: F = None
        self.z: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.v: D = None
        self.x: A = None
        self.s: C = None
        self.txt = txt

b = A("b")
c = B("c")
m = C("m")
g = D("g")
a = E("a")
k = F("k")
i = G("i")
j = C("j")
h = F("h")

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: A = None
        self.p: E = None
        self.s: A = None
        self.q: G = None
        self.u: F = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: C = None
        self.z: G = None
        self.y: G = None
        self.u: B = None
        self.w: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: F = None
        self.v: A = None
        self.u: D = None
        self.q: F = None
        self.z: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.v: D = None
        self.x: A = None
        self.s: C = None
        self.txt = txt

b = A("b")
c = B("c")
m = C("m")
g = D("g")
a = E("a")
k = F("k")
i = G("i")
j = C("j")
h = F("h")

b.s = i
b.u = i
c.p = j
c.u = b
c.x = m
m.u = i
m.w = h
g.r = i
g.q = i
g.v = b
g.s = b
g.y = b
g.p = a
g.u = h
a.x = g
a.q = g
a.t = j
a.z = i
a.y = i
a.u = c
a.w = b
k.o = a
k.y = h
k.q = h
k.z = h
k.v = b
k.u = g
i.p = b
i.x = b
i.z = a
i.v = g
i.s = m
j.u = i
j.w = k
h.o = a
h.y = k
h.q = k
h.z = k
h.v = b
h.u = g
assert m.u.z.q.p.t.w.u.txt == "g"