class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: A = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

g.y = f
g.r = m
g.o = j
a.t = j
a.o = j
a.s = j
a.w = f
a.x = k
a.r = g
j.y = l
f.y = c
f.t = c
f.w = i
f.s = j
f.z = g
f.r = m
c.o = k
c.q = j
c.z = a
k.w = i
b.t = j
b.o = j
b.s = j
b.w = f
b.x = k
b.r = g
l.t = j
l.o = j
l.s = j
l.w = f
l.x = k
l.r = m
m.y = f
m.r = g
m.o = j
i.o = k
i.q = j
i.z = l
assert i.z.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.r: A = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

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