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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: A = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: H = None
        self.w: I = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: A = None
        self.p: B = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.w: A = None
        self.u: A = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: H = None
        self.w: I = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: A = None
        self.p: B = None
        self.q: E = None
        self.v: G = None
        self.txt = txt

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

d.x = b
i.v = a
i.w = d
i.u = d
i.z = e
b.w = j
b.t = e
b.p = e
b.y = c
b.x = m
b.o = m
b.r = n
b.u = i
b.v = i
e.z = n
j.p = n
g.v = i
g.w = b
g.y = b
g.q = j
g.x = n
m.x = a
m.u = a
m.w = n
m.v = d
a.r = n
a.v = d
a.w = d
n.o = g
n.u = d
n.p = i
n.q = j
n.v = m
c.v = i
c.w = b
c.y = b
c.q = j
c.x = n
assert j.p.q.p.u.x.v.txt == "i"