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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: A = None
        self.v: I = None
        self.z: I = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: G = None
        self.w: I = None
        self.v: F = None
        self.o: E = None
        self.u: G = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: A = None
        self.v: I = None
        self.z: I = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: G = None
        self.w: I = None
        self.v: F = None
        self.o: E = None
        self.u: G = None
        self.p: B = None
        self.txt = txt

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

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

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