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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.s: E = None
        self.x: E = None
        self.r: A = None
        self.o: D = None
        self.txt = txt

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

g = A("g")
j = B("j")
h = C("h")
l = D("l")
c = E("c")
f = F("f")
m = G("m")
k = F("k")
i = G("i")
e = F("e")

g.y = k
g.s = c
g.w = h
g.r = m
j.x = l
h.p = c
h.y = c
h.u = f
h.w = g
l.o = e
l.u = f
c.o = e
c.t = m
f.t = l
f.o = l
f.y = c
f.s = c
f.x = c
f.r = g
m.x = h
k.t = l
k.o = l
k.y = c
k.s = c
k.x = c
k.r = g
i.x = h
e.t = l
e.o = l
e.y = c
e.s = c
e.x = c
e.r = g
assert l.o.r.w.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.w: C = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: E = None
        self.s: E = None
        self.x: E = None
        self.r: A = None
        self.o: D = None
        self.txt = txt

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

g = A("g")
j = B("j")
h = C("h")
l = D("l")
c = E("c")
f = F("f")
m = G("m")
k = F("k")
i = G("i")
e = F("e")

g.y = k
g.s = c
g.w = h
g.r = m
j.x = l
h.p = c
h.y = c
h.u = f
h.w = g
l.o = e
l.u = f
c.o = e
c.t = m
f.t = l
f.o = l
f.y = c
f.s = c
f.x = c
f.r = g
m.x = h
k.t = l
k.o = l
k.y = c
k.s = c
k.x = c
k.r = g
i.x = h
e.t = l
e.o = l
e.y = c
e.s = c
e.x = c
e.r = g
assert l.o.r.w.u.t.txt == "l"