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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

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

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

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