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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.q: B = None
        self.o: B = None
        self.v: C = None
        self.w: J = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: D = None
        self.z: E = None
        self.u: I = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.q: I = None
        self.u: F = None
        self.p: A = None
        self.t: B = None
        self.y: I = None
        self.w: B = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.q: B = None
        self.o: B = None
        self.v: C = None
        self.w: J = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: D = None
        self.z: E = None
        self.u: I = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: B = None
        self.q: I = None
        self.u: F = None
        self.p: A = None
        self.t: B = None
        self.y: I = None
        self.w: B = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: C = None
        self.txt = txt

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

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

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

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