class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: D = None
        self.t: A = None
        self.v: D = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

l = A("l")
a = B("a")
j = C("j")
b = D("b")
k = E("k")
m = F("m")
g = B("g")
d = A("d")
c = E("c")

l.y = c
l.x = b
l.v = b
l.t = d
l.s = m
a.w = m
a.u = b
a.z = c
j.u = a
j.s = a
j.y = g
j.v = g
j.w = m
b.r = j
k.r = b
k.w = b
k.v = g
m.o = c
g.w = m
g.u = b
g.z = k
d.y = c
d.x = b
d.v = b
d.t = l
d.s = m
c.r = b
c.w = b
c.v = g
assert c.v.z.w.r.w.o.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: D = None
        self.t: A = None
        self.v: D = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

l = A("l")
a = B("a")
j = C("j")
b = D("b")
k = E("k")
m = F("m")
g = B("g")
d = A("d")
c = E("c")

l.y = c
l.x = b
l.v = b
l.t = d
l.s = m
a.w = m
a.u = b
a.z = c
j.u = a
j.s = a
j.y = g
j.v = g
j.w = m
b.r = j
k.r = b
k.w = b
k.v = g
m.o = c
g.w = m
g.u = b
g.z = k
d.y = c
d.x = b
d.v = b
d.t = l
d.s = m
c.r = b
c.w = b
c.v = g
assert c.v.z.w.r.w.o.w.txt == "b"