class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: B = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: I = None
        self.y: F = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: A = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.s: C = None
        self.q: C = None
        self.p: C = None
        self.r: D = None
        self.x: E = None
        self.z: E = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: B = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: I = None
        self.y: F = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: A = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.s: C = None
        self.q: C = None
        self.p: C = None
        self.r: D = None
        self.x: E = None
        self.z: E = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: C = None
        self.x: E = None
        self.txt = txt

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

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

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