class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: C = None
        self.s: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: D = None
        self.r: F = None
        self.v: C = None
        self.q: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: D = None
        self.r: F = None
        self.v: C = None
        self.q: D = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.w: D = None
        self.t: E = None
        self.txt = txt

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

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

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