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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: D = None
        self.z: G = None
        self.s: F = None
        self.r: G = None
        self.q: E = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: E = None
        self.y: G = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

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

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

k = A("k")
h = B("h")
i = C("i")
d = D("d")
e = E("e")
b = F("b")
a = G("a")
f = A("f")
c = B("c")

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: D = None
        self.z: G = None
        self.s: F = None
        self.r: G = None
        self.q: E = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: E = None
        self.y: G = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.o: B = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

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

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

k = A("k")
h = B("h")
i = C("i")
d = D("d")
e = E("e")
b = F("b")
a = G("a")
f = A("f")
c = B("c")

k.w = e
h.v = i
h.p = i
h.x = f
i.o = a
i.z = a
i.r = a
i.t = a
i.v = d
i.s = b
i.q = e
d.r = a
d.y = a
d.z = e
d.p = c
e.t = k
e.v = k
e.o = h
e.w = a
b.q = i
b.o = d
b.s = e
b.t = e
b.r = e
a.u = f
a.p = b
a.o = i
f.w = e
c.v = i
c.p = i
c.x = f
assert k.w.w.p.r.w.u.w.txt == "e"