class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: B = None
        self.x: F = None
        self.v: I = None
        self.q: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: D = None
        self.r: A = None
        self.u: G = None
        self.p: B = None
        self.v: I = None
        self.w: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: D = None
        self.r: A = None
        self.u: G = None
        self.p: B = None
        self.v: I = None
        self.w: A = None
        self.txt = txt

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

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

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