class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.u: D = None
        self.o: C = None
        self.s: B = None
        self.p: F = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

i.w = j
i.v = j
i.u = h
i.o = a
i.x = a
i.s = b
i.p = e
m.r = n
a.y = i
a.x = i
a.p = e
a.v = m
h.y = e
h.v = a
h.z = k
h.w = i
j.w = i
e.z = m
k.p = a
k.w = m
k.y = h
b.r = n
n.y = e
n.v = a
n.z = k
n.w = i
assert m.r.w.s.r.y.z.r.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.u: D = None
        self.o: C = None
        self.s: B = None
        self.p: F = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

i.w = j
i.v = j
i.u = h
i.o = a
i.x = a
i.s = b
i.p = e
m.r = n
a.y = i
a.x = i
a.p = e
a.v = m
h.y = e
h.v = a
h.z = k
h.w = i
j.w = i
e.z = m
k.p = a
k.w = m
k.y = h
b.r = n
n.y = e
n.v = a
n.z = k
n.w = i
assert m.r.w.s.r.y.z.r.v.txt == "a"