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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: C = None
        self.x: B = None
        self.t: D = None
        self.r: H = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: G = None
        self.q: C = None
        self.v: A = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: F = None
        self.y: G = None
        self.v: B = None
        self.p: C = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: C = None
        self.u: C = None
        self.x: B = None
        self.t: D = None
        self.r: H = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: G = None
        self.q: C = None
        self.v: A = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: F = None
        self.y: G = None
        self.v: B = None
        self.p: C = None
        self.o: E = None
        self.txt = txt

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

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