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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: H = None
        self.v: I = None
        self.r: H = None
        self.u: G = None
        self.y: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: I = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.s: F = None
        self.q: H = None
        self.u: E = None
        self.p: C = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: I = None
        self.y: A = None
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: J = None
        self.t: G = None
        self.s: C = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: J = None
        self.s: C = None
        self.w: H = None
        self.v: B = None
        self.p: C = None
        self.u: J = None
        self.x: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: H = None
        self.v: I = None
        self.r: H = None
        self.u: G = None
        self.y: F = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: I = None
        self.r: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: A = None
        self.s: F = None
        self.q: H = None
        self.u: E = None
        self.p: C = None
        self.x: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: I = None
        self.y: A = None
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: J = None
        self.t: G = None
        self.s: C = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: J = None
        self.s: C = None
        self.w: H = None
        self.v: B = None
        self.p: C = None
        self.u: J = None
        self.x: G = None
        self.txt = txt

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

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

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