class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: D = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: F = None
        self.x: F = None
        self.u: B = None
        self.q: G = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: A = None
        self.x: F = None
        self.s: E = None
        self.txt = txt

l = A("l")
g = B("g")
c = C("c")
e = D("e")
m = E("m")
h = F("h")
a = G("a")

l.q = m
l.v = e
l.u = e
l.w = e
g.p = h
g.w = m
g.r = e
g.t = e
g.u = e
g.y = l
c.w = m
c.q = l
c.t = e
e.s = m
e.p = h
e.x = h
e.u = g
e.q = a
e.t = a
e.y = c
m.q = c
m.o = c
m.x = e
m.y = l
h.o = l
a.y = e
a.q = l
a.x = h
a.s = m
assert h.o.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: D = None
        self.u: D = None
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: F = None
        self.x: F = None
        self.u: B = None
        self.q: G = None
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: A = None
        self.x: F = None
        self.s: E = None
        self.txt = txt

l = A("l")
g = B("g")
c = C("c")
e = D("e")
m = E("m")
h = F("h")
a = G("a")

l.q = m
l.v = e
l.u = e
l.w = e
g.p = h
g.w = m
g.r = e
g.t = e
g.u = e
g.y = l
c.w = m
c.q = l
c.t = e
e.s = m
e.p = h
e.x = h
e.u = g
e.q = a
e.t = a
e.y = c
m.q = c
m.o = c
m.x = e
m.y = l
h.o = l
a.y = e
a.q = l
a.x = h
a.s = m
assert h.o.v.y.txt == "c"