class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

g = A("g")
h = B("h")
k = C("k")
d = D("d")
e = E("e")
l = F("l")
m = G("m")
b = C("b")
j = G("j")

g.z = e
g.y = e
h.x = k
h.t = g
k.p = b
k.v = e
d.y = e
d.z = g
d.r = l
e.s = j
l.y = j
l.u = g
l.z = h
m.w = b
m.q = g
m.r = d
m.s = h
b.p = k
b.v = e
j.w = b
j.q = g
j.r = d
j.s = h
assert m.q.z.s.q.y.s.s.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: E = None
        self.txt = txt

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

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

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

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

g = A("g")
h = B("h")
k = C("k")
d = D("d")
e = E("e")
l = F("l")
m = G("m")
b = C("b")
j = G("j")

g.z = e
g.y = e
h.x = k
h.t = g
k.p = b
k.v = e
d.y = e
d.z = g
d.r = l
e.s = j
l.y = j
l.u = g
l.z = h
m.w = b
m.q = g
m.r = d
m.s = h
b.p = k
b.v = e
j.w = b
j.q = g
j.r = d
j.s = h
assert m.q.z.s.q.y.s.s.t.y.txt == "e"