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

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

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

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

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

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

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

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

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

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

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

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

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

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

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