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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: F = None
        self.r: E = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.u: H = None
        self.z: I = None
        self.p: I = None
        self.w: H = None
        self.x: C = None
        self.y: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: D = None
        self.s: B = None
        self.w: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: C = None
        self.o: H = None
        self.r: E = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.s: F = None
        self.r: E = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.u: H = None
        self.z: I = None
        self.p: I = None
        self.w: H = None
        self.x: C = None
        self.y: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.z: D = None
        self.s: B = None
        self.w: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: C = None
        self.o: H = None
        self.r: E = None
        self.s: A = None
        self.txt = txt

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

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