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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: I = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: E = None
        self.t: H = None
        self.v: H = None
        self.p: H = None
        self.z: E = None
        self.s: C = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: I = None
        self.r: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.p: G = None
        self.w: C = None
        self.v: C = None
        self.o: F = None
        self.s: A = None
        self.x: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: I = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: E = None
        self.t: H = None
        self.v: H = None
        self.p: H = None
        self.z: E = None
        self.s: C = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: I = None
        self.r: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: E = None
        self.p: G = None
        self.w: C = None
        self.v: C = None
        self.o: F = None
        self.s: A = None
        self.x: G = None
        self.txt = txt

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

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