class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.u: C = None
        self.r: B = None
        self.t: A = None
        self.o: B = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: C = None
        self.u: C = None
        self.r: B = None
        self.t: A = None
        self.o: B = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

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