class A:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: I = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: H = None
        self.y: C = None
        self.w: E = None
        self.u: C = None
        self.p: I = None
        self.x: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: G = None
        self.v: G = None
        self.x: A = None
        self.z: C = None
        self.t: E = None
        self.txt = txt

h = A("h")
a = B("a")
d = C("d")
g = D("g")
j = E("j")
m = F("m")
b = G("b")
i = H("i")
f = I("f")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: I = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: H = None
        self.y: C = None
        self.w: E = None
        self.u: C = None
        self.p: I = None
        self.x: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: G = None
        self.v: G = None
        self.x: A = None
        self.z: C = None
        self.t: E = None
        self.txt = txt

h = A("h")
a = B("a")
d = C("d")
g = D("g")
j = E("j")
m = F("m")
b = G("b")
i = H("i")
f = I("f")

h.t = b
h.p = a
a.s = j
a.u = j
d.s = b
d.t = m
d.w = m
d.y = m
d.o = g
d.x = i
d.u = i
d.v = i
d.q = j
g.x = i
g.w = m
g.t = a
j.u = d
j.t = f
j.s = m
m.z = a
m.v = i
m.y = d
m.u = d
m.w = j
m.p = f
m.x = b
b.y = i
b.r = i
b.t = i
b.u = h
b.s = h
b.w = h
b.q = d
b.x = a
i.w = a
i.y = d
f.o = i
f.u = b
f.v = b
f.x = h
f.z = d
f.t = j
assert b.q.o.t.u.u.q.u.q.txt == "j"