class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: C = None
        self.z: E = None
        self.r: D = None
        self.p: E = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.s: H = None
        self.w: B = None
        self.x: D = None
        self.z: A = None
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: H = None
        self.o: H = None
        self.u: H = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: H = None
        self.w: E = None
        self.u: E = None
        self.y: C = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: C = None
        self.z: E = None
        self.r: D = None
        self.p: E = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.s: H = None
        self.w: B = None
        self.x: D = None
        self.z: A = None
        self.y: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: H = None
        self.o: H = None
        self.u: H = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: H = None
        self.w: E = None
        self.u: E = None
        self.y: C = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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