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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.w: G = None
        self.o: G = None
        self.t: H = None
        self.r: I = None
        self.q: B = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.t: A = None
        self.q: A = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: C = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.w: G = None
        self.o: G = None
        self.t: H = None
        self.r: I = None
        self.q: B = None
        self.z: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.t: A = None
        self.q: A = None
        self.p: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: C = None
        self.t: D = None
        self.txt = txt

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

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