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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.p: B = None
        self.q: E = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.p: B = None
        self.q: E = None
        self.s: A = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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