class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: B = None
        self.t: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: E = None
        self.u: A = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: H = None
        self.u: G = None
        self.r: G = None
        self.y: C = None
        self.p: D = None
        self.s: I = None
        self.o: H = None
        self.w: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: E = None
        self.u: A = None
        self.w: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: H = None
        self.u: G = None
        self.r: G = None
        self.y: C = None
        self.p: D = None
        self.s: I = None
        self.o: H = None
        self.w: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: B = None
        self.txt = txt

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

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

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