class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: H = None
        self.s: D = None
        self.z: D = None
        self.u: I = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.u: J = None
        self.w: J = None
        self.y: H = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: J = None
        self.s: C = None
        self.r: D = None
        self.p: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: J = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: D = None
        self.y: A = None
        self.p: G = None
        self.q: G = None
        self.z: A = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.u: G = None
        self.z: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: A = None
        self.u: J = None
        self.w: J = None
        self.y: H = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: J = None
        self.s: C = None
        self.r: D = None
        self.p: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: J = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: D = None
        self.y: A = None
        self.p: G = None
        self.q: G = None
        self.z: A = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.u: G = None
        self.z: H = None
        self.txt = txt

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

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

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