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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.s: H = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: H = None
        self.s: I = None
        self.t: F = None
        self.u: I = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: H = None
        self.y: A = None
        self.x: A = None
        self.t: E = None
        self.p: F = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: A = None
        self.s: H = None
        self.x: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: H = None
        self.s: I = None
        self.t: F = None
        self.u: I = None
        self.z: E = None
        self.r: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: H = None
        self.y: A = None
        self.x: A = None
        self.t: E = None
        self.p: F = None
        self.z: F = None
        self.txt = txt

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

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