class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: D = None
        self.q: D = None
        self.x: I = None
        self.w: E = None
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: E = None
        self.q: D = None
        self.v: I = None
        self.w: E = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: D = None
        self.q: C = None
        self.r: C = None
        self.x: D = None
        self.v: C = None
        self.z: C = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: G = None
        self.y: E = None
        self.w: E = None
        self.u: D = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: E = None
        self.q: D = None
        self.v: I = None
        self.w: E = None
        self.t: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: D = None
        self.q: C = None
        self.r: C = None
        self.x: D = None
        self.v: C = None
        self.z: C = None
        self.s: F = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: G = None
        self.y: E = None
        self.w: E = None
        self.u: D = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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