class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: H = None
        self.q: C = None
        self.z: B = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.s: G = None
        self.w: G = None
        self.y: E = None
        self.r: B = None
        self.o: F = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.s: G = None
        self.w: G = None
        self.y: E = None
        self.r: B = None
        self.o: F = None
        self.u: E = None
        self.txt = txt

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

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