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

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

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

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

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

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

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

n.z = i
n.w = i
n.q = i
n.o = k
n.y = l
l.y = b
l.z = b
l.x = j
l.o = n
j.p = k
b.x = l
b.z = i
b.o = i
b.s = i
b.y = n
i.q = l
i.v = l
k.v = n
k.x = n
k.u = l
k.y = l
k.s = j
assert k.y.o.o.v.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: F = None
        self.w: E = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

n.z = i
n.w = i
n.q = i
n.o = k
n.y = l
l.y = b
l.z = b
l.x = j
l.o = n
j.p = k
b.x = l
b.z = i
b.o = i
b.s = i
b.y = n
i.q = l
i.v = l
k.v = n
k.x = n
k.u = l
k.y = l
k.s = j
assert k.y.o.o.v.y.y.txt == "b"