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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

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

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

k = A("k")
h = B("h")
j = C("j")
f = D("f")
m = E("m")
b = F("b")
l = B("l")
e = C("e")
n = F("n")
d = B("d")

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: B = None
        self.o: A = None
        self.txt = txt

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

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

k = A("k")
h = B("h")
j = C("j")
f = D("f")
m = E("m")
b = F("b")
l = B("l")
e = C("e")
n = F("n")
d = B("d")

k.u = f
k.w = n
k.q = j
k.t = j
k.v = m
k.p = m
h.q = b
h.r = b
h.x = l
h.u = f
j.t = d
j.y = k
j.x = m
j.o = b
f.t = l
f.v = l
f.o = k
m.q = b
b.s = m
b.p = f
b.y = f
b.z = l
b.w = k
l.q = b
l.r = b
l.x = d
l.u = f
e.t = l
e.y = k
e.x = m
e.o = n
n.s = m
n.p = f
n.y = f
n.z = l
n.w = k
d.q = b
d.x = l
d.u = f
d.r = n
assert h.q.w.t.txt == "j"