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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: F = None
        self.t: F = None
        self.p: E = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: F = None
        self.t: F = None
        self.p: E = None
        self.x: E = None
        self.r: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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