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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: E = None
        self.x: G = None
        self.q: B = None
        self.w: F = None
        self.r: B = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.v: A = None
        self.u: E = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: E = None
        self.x: G = None
        self.q: B = None
        self.w: F = None
        self.r: B = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.v: A = None
        self.u: E = None
        self.y: D = None
        self.txt = txt

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

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