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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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