class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: D = None
        self.v: F = None
        self.t: H = None
        self.r: B = 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.p: F = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: H = None
        self.r: F = None
        self.v: H = None
        self.w: A = None
        self.txt = txt

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

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

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

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

n = A("n")
a = B("a")
f = C("f")
l = D("l")
j = E("j")
e = F("e")
c = G("c")
i = H("i")

n.p = f
n.q = l
n.v = e
n.t = i
n.r = a
a.z = c
f.p = e
f.t = a
l.o = i
l.x = i
l.v = i
l.r = e
l.w = n
j.z = l
j.v = c
j.u = e
e.s = a
e.y = j
e.p = j
e.t = l
e.v = c
c.p = j
c.v = j
c.u = j
c.t = a
c.y = e
i.q = j
i.o = e
i.s = e
assert a.z.t.z.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: D = None
        self.v: F = None
        self.t: H = None
        self.r: B = 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.p: F = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: H = None
        self.r: F = None
        self.v: H = None
        self.w: A = None
        self.txt = txt

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

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

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

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

n = A("n")
a = B("a")
f = C("f")
l = D("l")
j = E("j")
e = F("e")
c = G("c")
i = H("i")

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