class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: D = None
        self.o: C = None
        self.q: F = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.y: G = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.y: G = None
        self.r: A = None
        self.txt = txt

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

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

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

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

c.v = h
c.t = n
c.o = g
c.q = f
c.z = i
l.x = f
l.w = f
l.u = f
l.y = e
l.p = c
l.q = c
l.v = c
g.x = c
n.p = f
n.z = i
n.y = e
n.r = c
h.w = l
h.o = l
b.w = c
b.u = l
b.y = n
b.v = n
b.q = i
b.t = h
e.w = f
e.v = n
f.w = c
f.u = l
f.y = n
f.v = n
f.q = i
f.t = h
i.x = c
assert n.p.w.q.u.y.v.p.w.txt == "c"