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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: A = None
        self.y: G = None
        self.s: G = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: C = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.v: G = None
        self.x: C = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: A = None
        self.y: G = None
        self.s: G = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: C = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: D = None
        self.v: G = None
        self.x: C = None
        self.o: A = None
        self.s: F = None
        self.txt = txt

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

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

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

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