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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.z: A = None
        self.s: B = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.z: A = None
        self.s: B = None
        self.u: F = None
        self.txt = txt

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

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

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