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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: B = None
        self.z: A = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

b = A("b")
c = B("c")
i = C("i")
j = D("j")
g = E("g")
k = F("k")
n = C("n")
h = B("h")
l = A("l")
d = F("d")

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: B = None
        self.z: A = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

b = A("b")
c = B("c")
i = C("i")
j = D("j")
g = E("g")
k = F("k")
n = C("n")
h = B("h")
l = A("l")
d = F("d")

b.y = c
b.z = l
b.t = l
b.r = j
b.w = j
b.x = g
c.z = j
c.v = j
c.r = h
c.y = g
c.s = b
c.t = k
i.u = b
i.p = c
i.r = c
i.z = l
i.t = l
j.o = h
j.x = n
g.z = d
g.o = d
g.u = n
g.w = k
k.s = b
n.u = l
n.z = l
n.t = l
n.p = h
n.r = c
h.z = j
h.v = j
h.r = c
h.y = g
h.s = l
h.t = d
l.y = c
l.z = b
l.t = b
l.r = j
l.w = j
l.x = g
d.s = b
assert b.x.o.s.x.w.s.txt == "b"