class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: G = None
        self.w: C = None
        self.x: C = None
        self.o: E = None
        self.r: H = None
        self.t: E = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: G = None
        self.s: E = None
        self.u: F = None
        self.x: C = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: G = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: E = None
        self.z: C = None
        self.o: E = None
        self.u: B = None
        self.r: F = None
        self.x: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: G = None
        self.s: E = None
        self.u: F = None
        self.x: C = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: G = None
        self.x: E = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: E = None
        self.z: C = None
        self.o: E = None
        self.u: B = None
        self.r: F = None
        self.x: D = None
        self.txt = txt

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

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