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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: F = None
        self.r: A = None
        self.z: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: F = None
        self.r: A = None
        self.z: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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