class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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