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

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: C = None
        self.s: A = None
        self.u: A = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: C = None
        self.txt = txt

b = A("b")
c = B("c")
j = C("j")
e = D("e")
a = E("a")
g = F("g")
m = C("m")
i = B("i")
n = B("n")
d = D("d")

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

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

class C:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: C = None
        self.s: A = None
        self.u: A = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: C = None
        self.txt = txt

b = A("b")
c = B("c")
j = C("j")
e = D("e")
a = E("a")
g = F("g")
m = C("m")
i = B("i")
n = B("n")
d = D("d")

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