class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: D = None
        self.x: D = None
        self.u: D = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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