class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: D = None
        self.q: C = None
        self.y: E = None
        self.u: E = None
        self.p: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: G = None
        self.o: H = None
        self.y: F = None
        self.u: H = None
        self.r: C = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: B = None
        self.y: H = None
        self.o: C = None
        self.q: G = None
        self.t: F = None
        self.u: C = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: E = None
        self.y: B = None
        self.u: C = None
        self.z: A = None
        self.s: E = None
        self.x: A = None
        self.p: A = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: I = None
        self.w: A = None
        self.z: B = None
        self.p: B = None
        self.y: I = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: G = None
        self.o: H = None
        self.y: F = None
        self.u: H = None
        self.r: C = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: B = None
        self.y: H = None
        self.o: C = None
        self.q: G = None
        self.t: F = None
        self.u: C = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: E = None
        self.y: B = None
        self.u: C = None
        self.z: A = None
        self.s: E = None
        self.x: A = None
        self.p: A = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: I = None
        self.w: A = None
        self.z: B = None
        self.p: B = None
        self.y: I = None
        self.v: F = None
        self.txt = txt

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

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

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