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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: C = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.u: D = None
        self.p: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: B = None
        self.s: C = None
        self.o: A = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: C = None
        self.x: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: B = None
        self.u: D = None
        self.p: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: B = None
        self.s: C = None
        self.o: A = None
        self.w: G = None
        self.txt = txt

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

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

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