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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: J = None
        self.y: F = None
        self.w: A = None
        self.r: A = None
        self.q: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: I = None
        self.o: C = None
        self.z: I = None
        self.q: I = None
        self.r: G = None
        self.u: B = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: F = None
        self.q: E = None
        self.w: F = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.z: I = None
        self.v: C = None
        self.x: D = None
        self.r: G = None
        self.q: G = None
        self.s: I = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: J = None
        self.y: F = None
        self.w: A = None
        self.r: A = None
        self.q: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: I = None
        self.o: C = None
        self.z: I = None
        self.q: I = None
        self.r: G = None
        self.u: B = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.z: F = None
        self.q: E = None
        self.w: F = None
        self.u: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.z: I = None
        self.v: C = None
        self.x: D = None
        self.r: G = None
        self.q: G = None
        self.s: I = None
        self.y: G = None
        self.txt = txt

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

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