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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: E = None
        self.o: A = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.x: C = None
        self.p: I = None
        self.t: C = None
        self.y: F = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: I = None
        self.v: E = None
        self.x: A = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: E = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.x: H = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: E = None
        self.o: A = None
        self.u: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: F = None
        self.x: C = None
        self.p: I = None
        self.t: C = None
        self.y: F = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: I = None
        self.v: E = None
        self.x: A = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: E = None
        self.t: F = None
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: E = None
        self.x: H = None
        self.p: C = None
        self.txt = txt

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

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