class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.s: E = None
        self.x: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

l = A("l")
j = B("j")
i = C("i")
m = D("m")
a = E("a")
k = F("k")
c = G("c")
d = A("d")

l.y = m
l.u = j
l.s = a
l.x = d
j.q = m
j.s = m
j.t = a
j.r = i
i.q = m
i.o = j
m.p = a
m.x = a
m.v = l
m.q = l
m.r = d
m.u = c
m.o = k
a.o = d
a.y = k
a.w = c
a.u = c
k.r = l
k.t = a
k.x = a
k.o = a
k.z = i
k.s = i
k.p = m
c.w = m
d.y = m
d.u = j
d.s = a
d.x = l
assert i.q.o.p.o.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: B = None
        self.s: E = None
        self.x: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: E = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

l = A("l")
j = B("j")
i = C("i")
m = D("m")
a = E("a")
k = F("k")
c = G("c")
d = A("d")

l.y = m
l.u = j
l.s = a
l.x = d
j.q = m
j.s = m
j.t = a
j.r = i
i.q = m
i.o = j
m.p = a
m.x = a
m.v = l
m.q = l
m.r = d
m.u = c
m.o = k
a.o = d
a.y = k
a.w = c
a.u = c
k.r = l
k.t = a
k.x = a
k.o = a
k.z = i
k.s = i
k.p = m
c.w = m
d.y = m
d.u = j
d.s = a
d.x = l
assert i.q.o.p.o.r.s.txt == "a"