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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: H = None
        self.z: H = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.p: I = None
        self.r: I = None
        self.y: E = None
        self.w: A = None
        self.z: C = None
        self.x: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: H = None
        self.z: H = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: E = None
        self.p: I = None
        self.r: I = None
        self.y: E = None
        self.w: A = None
        self.z: C = None
        self.x: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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