class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: G = None
        self.w: B = None
        self.r: G = None
        self.t: I = None
        self.p: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: A = None
        self.z: A = None
        self.v: H = None
        self.q: A = None
        self.s: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: E = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: A = None
        self.z: A = None
        self.v: H = None
        self.q: A = None
        self.s: F = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: E = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

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

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