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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: B = None
        self.u: A = None
        self.q: A = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: D = None
        self.q: F = None
        self.y: A = None
        self.txt = txt

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

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

b.v = l
b.z = l
b.w = d
b.s = j
b.t = j
j.t = b
j.p = b
j.u = c
j.w = c
l.y = b
l.z = n
n.t = l
n.z = j
n.u = b
n.q = b
n.s = c
d.p = b
d.y = b
d.w = n
d.q = c
c.r = j
c.u = n
assert d.q.u.s.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.w: E = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: B = None
        self.u: A = None
        self.q: A = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: D = None
        self.q: F = None
        self.y: A = None
        self.txt = txt

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

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

b.v = l
b.z = l
b.w = d
b.s = j
b.t = j
j.t = b
j.p = b
j.u = c
j.w = c
l.y = b
l.z = n
n.t = l
n.z = j
n.u = b
n.q = b
n.s = c
d.p = b
d.y = b
d.w = n
d.q = c
c.r = j
c.u = n
assert d.q.u.s.u.txt == "n"