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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.v: F = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.v: F = None
        self.r: E = None
        self.t: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

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