class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: H = None
        self.s: H = None
        self.y: F = None
        self.q: D = None
        self.x: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.o: F = None
        self.u: H = None
        self.y: G = None
        self.w: C = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.o: F = None
        self.u: H = None
        self.y: G = None
        self.w: C = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

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

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