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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: D = None
        self.r: G = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: D = None
        self.s: B = None
        self.v: E = None
        self.p: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: D = None
        self.r: G = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: D = None
        self.s: B = None
        self.v: E = None
        self.p: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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