class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: D = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: J = None
        self.o: E = None
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.s: A = None
        self.x: I = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.w: D = None
        self.q: G = None
        self.u: D = None
        self.t: B = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: F = None
        self.z: F = None
        self.y: F = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: J = None
        self.o: E = None
        self.r: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: F = None
        self.s: A = None
        self.x: I = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.w: D = None
        self.q: G = None
        self.u: D = None
        self.t: B = None
        self.v: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: F = None
        self.z: F = None
        self.y: F = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

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

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