class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: J = None
        self.y: E = None
        self.p: E = None
        self.q: D = None
        self.v: B = None
        self.t: B = None
        self.w: E = None
        self.r: F = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.z: C = None
        self.y: E = None
        self.p: I = None
        self.v: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: I = None
        self.t: H = None
        self.r: B = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: A = None
        self.w: E = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: G = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: H = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.z: C = None
        self.y: E = None
        self.p: I = None
        self.v: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: I = None
        self.t: H = None
        self.r: B = None
        self.z: C = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: A = None
        self.w: E = None
        self.o: D = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: G = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: H = None
        self.y: E = None
        self.txt = txt

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

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