class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: G = None
        self.r: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.v: A = None
        self.z: F = None
        self.s: F = None
        self.q: H = None
        self.x: C = None
        self.o: H = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: G = None
        self.u: D = None
        self.o: C = None
        self.v: C = None
        self.s: D = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: E = None
        self.q: H = None
        self.u: B = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: H = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: G = None
        self.r: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: E = None
        self.v: A = None
        self.z: F = None
        self.s: F = None
        self.q: H = None
        self.x: C = None
        self.o: H = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: G = None
        self.u: D = None
        self.o: C = None
        self.v: C = None
        self.s: D = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: E = None
        self.q: H = None
        self.u: B = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: H = None
        self.u: C = None
        self.txt = txt

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

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