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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: F = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

e = A("e")
k = B("k")
d = C("d")
n = D("n")
m = E("m")
c = F("c")
f = G("f")
j = A("j")
i = E("i")
a = E("a")

e.v = k
e.s = f
e.u = c
e.y = m
k.w = n
k.o = d
d.w = j
d.s = j
d.o = j
d.u = f
d.p = n
n.y = d
n.s = i
m.x = k
m.w = c
m.t = f
c.o = n
f.x = d
j.v = k
j.s = f
j.u = c
j.y = i
i.x = k
i.w = c
i.t = f
a.x = k
a.w = c
a.t = f
assert a.w.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: G = None
        self.u: F = None
        self.y: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: F = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

e = A("e")
k = B("k")
d = C("d")
n = D("n")
m = E("m")
c = F("c")
f = G("f")
j = A("j")
i = E("i")
a = E("a")

e.v = k
e.s = f
e.u = c
e.y = m
k.w = n
k.o = d
d.w = j
d.s = j
d.o = j
d.u = f
d.p = n
n.y = d
n.s = i
m.x = k
m.w = c
m.t = f
c.o = n
f.x = d
j.v = k
j.s = f
j.u = c
j.y = i
i.x = k
i.w = c
i.t = f
a.x = k
a.w = c
a.t = f
assert a.w.o.s.txt == "i"