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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: G = None
        self.s: E = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.q: A = None
        self.t: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.r: C = None
        self.u: B = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: G = None
        self.s: E = None
        self.x: F = None
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: H = None
        self.q: A = None
        self.t: G = None
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.r: C = None
        self.u: B = None
        self.x: H = None
        self.txt = txt

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

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

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