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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: A = None
        self.q: D = None
        self.t: C = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.x: G = None
        self.w: D = None
        self.y: F = None
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: C = None
        self.t: B = None
        self.r: G = None
        self.v: E = None
        self.txt = txt

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

m = A("m")
k = B("k")
d = C("d")
j = D("j")
l = E("l")
b = F("b")
e = G("e")
n = A("n")

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: A = None
        self.q: D = None
        self.t: C = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.x: G = None
        self.w: D = None
        self.y: F = None
        self.o: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: C = None
        self.t: B = None
        self.r: G = None
        self.v: E = None
        self.txt = txt

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

m = A("m")
k = B("k")
d = C("d")
j = D("j")
l = E("l")
b = F("b")
e = G("e")
n = A("n")

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