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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: E = None
        self.y: F = None
        self.p: G = None
        self.r: E = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: C = None
        self.x: A = None
        self.w: G = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: G = None
        self.t: G = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: C = None
        self.w: G = None
        self.x: B = None
        self.v: C = None
        self.q: A = None
        self.y: G = None
        self.txt = txt

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

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

j.z = a
j.q = e
j.s = c
b.t = l
b.s = n
b.r = n
b.v = n
b.y = e
b.p = m
a.z = m
a.w = m
a.p = l
a.u = l
a.y = l
a.x = j
c.p = e
c.v = e
n.r = a
n.v = m
n.t = m
n.p = e
e.t = n
e.u = a
e.w = m
e.y = m
e.x = b
e.v = l
e.q = j
m.w = e
m.s = c
l.z = m
l.w = m
l.p = a
l.u = a
l.y = a
l.x = j
assert m.w.t.p.v.w.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: E = None
        self.y: F = None
        self.p: G = None
        self.r: E = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: C = None
        self.x: A = None
        self.w: G = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: G = None
        self.t: G = None
        self.p: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: C = None
        self.w: G = None
        self.x: B = None
        self.v: C = None
        self.q: A = None
        self.y: G = None
        self.txt = txt

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

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

j.z = a
j.q = e
j.s = c
b.t = l
b.s = n
b.r = n
b.v = n
b.y = e
b.p = m
a.z = m
a.w = m
a.p = l
a.u = l
a.y = l
a.x = j
c.p = e
c.v = e
n.r = a
n.v = m
n.t = m
n.p = e
e.t = n
e.u = a
e.w = m
e.y = m
e.x = b
e.v = l
e.q = j
m.w = e
m.s = c
l.z = m
l.w = m
l.p = a
l.u = a
l.y = a
l.x = j
assert m.w.t.p.v.w.s.txt == "c"