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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: F = None
        self.v: B = None
        self.q: G = None
        self.p: G = None
        self.x: F = None
        self.y: G = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: D = None
        self.v: G = None
        self.y: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: F = None
        self.v: A = None
        self.z: H = None
        self.o: F = None
        self.x: B = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: D = None
        self.r: C = None
        self.o: E = None
        self.q: G = None
        self.z: C = None
        self.s: D = None
        self.p: H = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: F = None
        self.v: B = None
        self.q: G = None
        self.p: G = None
        self.x: F = None
        self.y: G = None
        self.t: A = None
        self.s: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: D = None
        self.v: G = None
        self.y: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: F = None
        self.v: A = None
        self.z: H = None
        self.o: F = None
        self.x: B = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: D = None
        self.r: C = None
        self.o: E = None
        self.q: G = None
        self.z: C = None
        self.s: D = None
        self.p: H = None
        self.t: G = None
        self.txt = txt

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

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