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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: E = None
        self.s: C = None
        self.r: F = None
        self.z: E = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: F = None
        self.o: E = None
        self.u: A = None
        self.r: B = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: A = None
        self.y: G = None
        self.r: B = None
        self.w: G = None
        self.t: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: E = None
        self.s: C = None
        self.r: F = None
        self.z: E = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: F = None
        self.o: E = None
        self.u: A = None
        self.r: B = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: A = None
        self.y: G = None
        self.r: B = None
        self.w: G = None
        self.t: A = None
        self.txt = txt

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

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

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