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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: B = None
        self.o: E = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: D = None
        self.r: G = None
        self.x: G = None
        self.p: E = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: B = None
        self.o: E = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: D = None
        self.r: G = None
        self.x: G = None
        self.p: E = None
        self.s: A = None
        self.txt = txt

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

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