class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: G = None
        self.y: H = None
        self.r: C = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: G = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: H = None
        self.u: I = None
        self.s: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: A = None
        self.r: B = None
        self.y: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: I = None
        self.q: F = None
        self.v: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: G = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: H = None
        self.u: I = None
        self.s: B = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: A = None
        self.r: B = None
        self.y: H = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: I = None
        self.q: F = None
        self.v: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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