class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.u: B = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.u: B = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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