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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: D = None
        self.y: C = None
        self.v: C = None
        self.o: E = None
        self.txt = txt

b = A("b")
k = B("k")
a = C("a")
j = D("j")
f = E("f")
n = F("n")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: D = None
        self.y: C = None
        self.v: C = None
        self.o: E = None
        self.txt = txt

b = A("b")
k = B("k")
a = C("a")
j = D("j")
f = E("f")
n = F("n")

b.v = a
b.u = n
b.o = k
b.t = f
b.q = f
b.x = f
k.s = n
a.x = j
j.v = f
j.w = a
j.p = b
j.u = b
j.s = k
j.r = n
f.u = a
n.p = j
n.w = j
n.y = a
n.v = a
n.o = f
assert b.t.u.x.txt == "j"