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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: C = None
        self.q: C = None
        self.z: A = None
        self.u: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.p: J = None
        self.v: A = None
        self.x: J = None
        self.s: A = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: J = None
        self.t: B = None
        self.u: D = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: A = None
        self.u: G = None
        self.z: E = None
        self.v: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: C = None
        self.q: C = None
        self.z: A = None
        self.u: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: E = None
        self.p: J = None
        self.v: A = None
        self.x: J = None
        self.s: A = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: J = None
        self.t: B = None
        self.u: D = None
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: A = None
        self.u: G = None
        self.z: E = None
        self.v: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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