class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.x: C = None
        self.z: A = None
        self.p: B = None
        self.u: H = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: C = None
        self.p: F = None
        self.w: E = None
        self.y: H = None
        self.s: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: D = None
        self.q: B = None
        self.o: A = None
        self.t: C = None
        self.p: B = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: C = None
        self.x: C = None
        self.z: A = None
        self.p: B = None
        self.u: H = None
        self.y: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: C = None
        self.p: F = None
        self.w: E = None
        self.y: H = None
        self.s: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: D = None
        self.q: B = None
        self.o: A = None
        self.t: C = None
        self.p: B = None
        self.z: C = None
        self.txt = txt

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

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