class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: H = None
        self.r: C = None
        self.p: C = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: D = None
        self.o: I = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: H = None
        self.y: D = None
        self.r: A = None
        self.x: H = None
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: E = None
        self.t: E = None
        self.s: H = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: D = None
        self.o: I = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: H = None
        self.y: D = None
        self.r: A = None
        self.x: H = None
        self.o: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: E = None
        self.t: E = None
        self.s: H = None
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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