class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: H = None
        self.t: F = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: H = None
        self.y: C = None
        self.x: D = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.w: G = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: B = None
        self.q: A = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.u: C = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: H = None
        self.y: C = None
        self.x: D = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: F = None
        self.w: G = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: B = None
        self.q: A = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.u: C = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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