class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: E = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: A = None
        self.p: H = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: I = None
        self.z: D = None
        self.u: B = None
        self.s: D = None
        self.r: H = None
        self.t: H = None
        self.txt = txt

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

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

e.x = d
e.z = n
g.x = h
b.u = h
b.q = m
b.r = n
d.u = m
d.t = m
d.z = m
d.x = b
d.s = i
d.q = i
d.p = i
d.w = l
d.o = g
m.s = b
m.z = e
m.p = j
m.r = h
n.z = e
n.p = e
n.s = d
n.o = h
n.v = l
n.t = m
n.r = b
n.w = j
n.x = i
i.u = d
i.s = e
i.r = j
i.q = j
i.p = l
i.w = g
h.q = g
h.u = g
h.o = l
h.z = d
h.s = d
h.r = j
h.t = j
l.q = m
l.u = e
l.v = h
l.x = n
l.o = b
l.z = b
l.s = i
j.q = g
j.u = g
j.o = l
j.z = d
j.s = d
j.r = h
j.t = h
assert d.p.r.r.t.t.q.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: E = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: A = None
        self.p: H = None
        self.r: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: I = None
        self.z: D = None
        self.u: B = None
        self.s: D = None
        self.r: H = None
        self.t: H = None
        self.txt = txt

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

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

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