class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: H = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: F = None
        self.t: C = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: I = None
        self.v: I = None
        self.w: H = None
        self.r: J = None
        self.z: B = None
        self.o: I = None
        self.t: G = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: F = None
        self.r: G = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: A = None
        self.w: I = None
        self.x: E = None
        self.v: A = None
        self.s: B = None
        self.t: J = None
        self.z: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: B = None
        self.w: A = None
        self.u: C = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.s: F = None
        self.q: I = None
        self.p: G = None
        self.u: F = None
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: F = None
        self.t: C = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: I = None
        self.v: I = None
        self.w: H = None
        self.r: J = None
        self.z: B = None
        self.o: I = None
        self.t: G = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: F = None
        self.r: G = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: A = None
        self.w: I = None
        self.x: E = None
        self.v: A = None
        self.s: B = None
        self.t: J = None
        self.z: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: B = None
        self.w: A = None
        self.u: C = None
        self.x: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.s: F = None
        self.q: I = None
        self.p: G = None
        self.u: F = None
        self.t: H = None
        self.txt = txt

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

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