class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.r: F = None
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: E = None
        self.w: I = None
        self.t: E = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: I = None
        self.p: D = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: D = None
        self.u: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: E = None
        self.z: C = None
        self.u: A = None
        self.p: C = None
        self.t: B = None
        self.txt = txt

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

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

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

i.q = j
i.w = j
i.r = g
i.y = e
b.u = n
d.z = n
d.v = b
d.t = i
h.q = g
h.p = j
h.t = j
h.w = n
h.z = n
j.y = h
j.p = h
j.r = h
j.t = n
j.u = b
g.o = i
g.y = h
g.u = j
g.w = j
e.x = g
e.s = j
e.z = d
e.p = d
e.u = i
e.t = b
l.p = e
l.q = b
l.u = g
n.u = b
n.o = d
n.w = d
n.t = e
n.y = g
n.v = l
assert e.s.t.o.t.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.r: F = None
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: E = None
        self.w: I = None
        self.t: E = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: I = None
        self.p: D = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: D = None
        self.u: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: E = None
        self.z: C = None
        self.u: A = None
        self.p: C = None
        self.t: B = None
        self.txt = txt

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

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

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

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