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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: A = None
        self.s: B = None
        self.t: C = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.z: C = None
        self.x: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: A = None
        self.s: B = None
        self.t: C = None
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.p: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.z: C = None
        self.x: C = None
        self.txt = txt

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

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

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