class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: B = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: A = None
        self.p: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: B = None
        self.v: A = None
        self.x: A = None
        self.t: D = None
        self.p: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: A = None
        self.p: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: B = None
        self.v: A = None
        self.x: A = None
        self.t: D = None
        self.p: G = None
        self.txt = txt

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

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

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