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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: J = None
        self.z: B = None
        self.o: H = None
        self.x: H = None
        self.y: F = None
        self.w: B = None
        self.s: A = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: B = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: D = None
        self.v: C = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: I = None
        self.y: B = None
        self.q: D = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: A = None
        self.p: C = None
        self.r: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: J = None
        self.z: B = None
        self.o: H = None
        self.x: H = None
        self.y: F = None
        self.w: B = None
        self.s: A = None
        self.v: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: B = None
        self.u: E = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.q: D = None
        self.v: C = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: I = None
        self.y: B = None
        self.q: D = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: A = None
        self.p: C = None
        self.r: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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