class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: C = None
        self.v: F = None
        self.o: B = None
        self.r: G = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: G = None
        self.o: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: B = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: D = None
        self.txt = txt

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

l.q = a
l.w = g
l.v = h
l.o = b
l.r = k
l.p = k
e.s = k
e.u = k
e.o = c
e.z = m
g.v = a
g.s = j
a.q = g
m.p = c
m.x = e
m.q = g
h.p = e
h.q = b
h.v = k
h.x = a
h.r = j
k.p = m
k.v = a
c.q = a
c.w = g
c.v = h
c.o = e
c.r = k
c.p = k
b.s = k
b.u = k
b.o = l
b.z = m
j.p = c
j.x = e
j.q = g
assert a.q.v.q.v.q.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: C = None
        self.v: F = None
        self.o: B = None
        self.r: G = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: G = None
        self.o: A = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: B = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: D = None
        self.txt = txt

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

l.q = a
l.w = g
l.v = h
l.o = b
l.r = k
l.p = k
e.s = k
e.u = k
e.o = c
e.z = m
g.v = a
g.s = j
a.q = g
m.p = c
m.x = e
m.q = g
h.p = e
h.q = b
h.v = k
h.x = a
h.r = j
k.p = m
k.v = a
c.q = a
c.w = g
c.v = h
c.o = e
c.r = k
c.p = k
b.s = k
b.u = k
b.o = l
b.z = m
j.p = c
j.x = e
j.q = g
assert a.q.v.q.v.q.s.p.txt == "c"