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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: F = None
        self.o: B = None
        self.q: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: A = None
        self.t: C = None
        self.v: D = None
        self.x: A = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: H = None
        self.r: C = None
        self.s: F = None
        self.w: F = None
        self.o: C = None
        self.u: F = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: F = None
        self.o: B = None
        self.q: G = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: A = None
        self.t: C = None
        self.v: D = None
        self.x: A = None
        self.w: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: H = None
        self.r: C = None
        self.s: F = None
        self.w: F = None
        self.o: C = None
        self.u: F = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.q: E = None
        self.x: G = None
        self.txt = txt

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

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