class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: H = None
        self.r: H = None
        self.z: I = None
        self.p: C = None
        self.q: E = None
        self.u: I = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: F = None
        self.u: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: H = None
        self.r: H = None
        self.z: I = None
        self.p: C = None
        self.q: E = None
        self.u: I = None
        self.t: D = None
        self.x: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: F = None
        self.u: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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