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

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

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: J = None
        self.x: C = None
        self.o: J = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: J = None
        self.x: C = None
        self.o: J = None
        self.z: H = None
        self.txt = txt

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

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

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