class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: H = None
        self.y: I = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: A = None
        self.u: C = None
        self.x: C = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.o: G = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: F = None
        self.z: A = None
        self.y: H = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: A = None
        self.u: C = None
        self.x: C = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.o: G = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: F = None
        self.z: A = None
        self.y: H = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

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