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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: I = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: D = None
        self.u: E = None
        self.o: D = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: A = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: I = None
        self.o: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: D = None
        self.u: E = None
        self.o: D = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: A = None
        self.w: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: I = None
        self.txt = txt

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

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

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