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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: F = None
        self.y: G = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: F = None
        self.y: G = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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