class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: G = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: G = None
        self.y: H = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.v: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: G = None
        self.y: H = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.v: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.txt = txt

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

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

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

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