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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: E = None
        self.p: C = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.r: E = None
        self.u: I = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: A = None
        self.q: B = None
        self.y: G = None
        self.p: G = None
        self.v: E = None
        self.x: A = None
        self.t: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: J = None
        self.x: J = None
        self.y: J = None
        self.z: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.y: A = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: C = None
        self.y: B = None
        self.x: J = None
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: E = None
        self.p: C = None
        self.t: F = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.r: E = None
        self.u: I = None
        self.o: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: A = None
        self.q: B = None
        self.y: G = None
        self.p: G = None
        self.v: E = None
        self.x: A = None
        self.t: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: J = None
        self.x: J = None
        self.y: J = None
        self.z: G = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: B = None
        self.y: A = None
        self.w: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: C = None
        self.y: B = None
        self.x: J = None
        self.u: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: E = None
        self.txt = txt

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

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