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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: E = None
        self.z: A = None
        self.q: H = None
        self.u: C = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: B = None
        self.t: H = None
        self.r: H = None
        self.q: E = None
        self.s: C = None
        self.p: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.r: B = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: B = None
        self.u: B = None
        self.s: A = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: E = None
        self.z: A = None
        self.q: H = None
        self.u: C = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: B = None
        self.t: H = None
        self.r: H = None
        self.q: E = None
        self.s: C = None
        self.p: C = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: B = None
        self.r: B = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: B = None
        self.u: B = None
        self.s: A = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

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

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