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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: D = None
        self.u: F = None
        self.q: H = None
        self.t: H = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: E = None
        self.o: A = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: H = None
        self.z: E = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: J = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: E = None
        self.t: J = None
        self.r: D = None
        self.q: D = None
        self.x: D = None
        self.w: D = None
        self.s: F = None
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: D = None
        self.u: F = None
        self.q: H = None
        self.t: H = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: E = None
        self.o: A = None
        self.t: G = None
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: H = None
        self.z: E = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: J = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: E = None
        self.t: J = None
        self.r: D = None
        self.q: D = None
        self.x: D = None
        self.w: D = None
        self.s: F = None
        self.o: B = None
        self.txt = txt

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

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

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