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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.q: A = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: C = None
        self.u: A = None
        self.r: D = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.v: D = None
        self.txt = txt

a = A("a")
e = B("e")
i = C("i")
g = D("g")
b = E("b")
f = F("f")
k = A("k")

a.s = b
a.w = b
a.z = e
e.o = i
e.w = i
e.x = k
e.q = k
e.p = a
i.q = b
i.y = b
i.o = k
i.w = k
i.t = f
i.u = e
g.w = b
g.x = k
g.t = e
b.o = g
b.r = g
b.z = i
b.u = k
b.y = a
f.r = e
f.x = a
f.v = g
k.s = b
k.w = b
k.z = e
assert k.z.o.t.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: E = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.q: A = None
        self.w: C = None
        self.p: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: C = None
        self.u: A = None
        self.r: D = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.v: D = None
        self.txt = txt

a = A("a")
e = B("e")
i = C("i")
g = D("g")
b = E("b")
f = F("f")
k = A("k")

a.s = b
a.w = b
a.z = e
e.o = i
e.w = i
e.x = k
e.q = k
e.p = a
i.q = b
i.y = b
i.o = k
i.w = k
i.t = f
i.u = e
g.w = b
g.x = k
g.t = e
b.o = g
b.r = g
b.z = i
b.u = k
b.y = a
f.r = e
f.x = a
f.v = g
k.s = b
k.w = b
k.z = e
assert k.z.o.t.x.s.txt == "b"