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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.t: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.v: H = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: D = None
        self.q: H = None
        self.w: G = None
        self.o: C = None
        self.t: J = None
        self.u: A = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: J = None
        self.q: E = None
        self.r: E = None
        self.x: B = None
        self.t: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: G = None
        self.s: I = None
        self.x: E = None
        self.w: C = None
        self.p: F = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.t: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: C = None
        self.v: H = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: J = None
        self.p: D = None
        self.q: H = None
        self.w: G = None
        self.o: C = None
        self.t: J = None
        self.u: A = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: J = None
        self.v: J = None
        self.q: E = None
        self.r: E = None
        self.x: B = None
        self.t: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: G = None
        self.s: I = None
        self.x: E = None
        self.w: C = None
        self.p: F = None
        self.o: D = None
        self.txt = txt

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

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