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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: J = None
        self.q: F = None
        self.y: H = None
        self.w: I = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: J = None
        self.z: J = None
        self.r: I = None
        self.u: D = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: J = None
        self.z: E = None
        self.w: C = None
        self.x: F = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: C = None
        self.y: D = None
        self.t: H = None
        self.p: D = None
        self.q: G = None
        self.w: A = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.u: C = None
        self.s: E = None
        self.q: D = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: J = None
        self.q: F = None
        self.y: H = None
        self.w: I = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: J = None
        self.z: J = None
        self.r: I = None
        self.u: D = None
        self.y: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: J = None
        self.z: E = None
        self.w: C = None
        self.x: F = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: C = None
        self.y: D = None
        self.t: H = None
        self.p: D = None
        self.q: G = None
        self.w: A = None
        self.r: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.u: C = None
        self.s: E = None
        self.q: D = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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