class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: H = None
        self.v: G = None
        self.r: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: A = None
        self.s: A = None
        self.x: C = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: A = None
        self.p: B = None
        self.z: C = None
        self.x: B = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: D = None
        self.t: H = None
        self.q: H = None
        self.y: B = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: G = None
        self.t: D = None
        self.q: A = None
        self.z: A = None
        self.s: F = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: A = None
        self.s: A = None
        self.x: C = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: A = None
        self.p: B = None
        self.z: C = None
        self.x: B = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: D = None
        self.t: H = None
        self.q: H = None
        self.y: B = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: G = None
        self.t: D = None
        self.q: A = None
        self.z: A = None
        self.s: F = None
        self.r: G = None
        self.txt = txt

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

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