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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: H = None
        self.o: A = None
        self.v: B = None
        self.u: A = None
        self.t: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: H = None
        self.o: A = None
        self.v: B = None
        self.u: A = None
        self.t: E = None
        self.txt = txt

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

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

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