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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: I = None
        self.o: F = None
        self.r: D = None
        self.w: I = None
        self.z: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: B = None
        self.q: G = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.t: C = None
        self.p: E = None
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: I = None
        self.o: F = None
        self.r: D = None
        self.w: I = None
        self.z: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: B = None
        self.q: G = None
        self.z: E = None
        self.w: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.t: C = None
        self.p: E = None
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: G = None
        self.txt = txt

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

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